]> git.pld-linux.org Git - packages/python-html5lib.git/blame - python-html5lib.spec
- updated to 0.999999999; added python3- package
[packages/python-html5lib.git] / python-html5lib.spec
CommitLineData
9ef7658b
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without tests # py.test tests
6#
f90d5fea
PZ
7%define module html5lib
8Summary: HTML parser/tokenizer based on the WHATWG HTML5 specification
7d3ef1a6 9Summary(pl.UTF-8): Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5
f90d5fea 10Name: python-%{module}
9ef7658b 11Version: 0.999999999
4b8ba435 12Release: 1
f90d5fea
PZ
13License: MIT
14Group: Libraries/Python
4b8ba435
JB
15#Source0Download: https://github.com/html5lib/html5lib-python/releases
16Source0: https://github.com/html5lib/html5lib-python/archive/%{version}/%{module}-%{version}.tar.gz
9ef7658b 17# Source0-md5: a81446ef3ce3ef18f5e8e242b7072b83
4b8ba435 18URL: https://github.com/html5lib/
9ef7658b
JB
19%if %{with python2}
20BuildRequires: python-devel >= 1:2.6
21BuildRequires: python-setuptools >= 18.5
22%if %{with tests}
23BuildRequires: python-flake8
24BuildRequires: python-mock
25%if "%{py_ver}" < "2.7"
26BuildRequires: python-ordereddict
27%endif
28BuildRequires: python-pytest
29BuildRequires: python-pytest-expect >= 1.1
30BuildRequires: python-pytest-expect < 2.0
31BuildRequires: python-six
32BuildRequires: python-webencodings
33%endif
34%endif
35%if %{with python3}
36BuildRequires: python3-devel >= 1:3.3
37BuildRequires: python3-setuptools >= 18.5
38%if %{with tests}
39BuildRequires: python3-flake8
40BuildRequires: python3-pytest
41BuildRequires: python3-pytest-expect >= 1.1
42BuildRequires: python3-pytest-expect < 2.0
43BuildRequires: python3-six
44BuildRequires: python3-webencodings
45%endif
46%endif
7d3ef1a6 47BuildRequires: rpm-pythonprov
4b8ba435 48BuildRequires: rpmbuild(macros) >= 1.714
9ef7658b 49Requires: python-modules >= 1:2.6
7d3ef1a6 50BuildArch: noarch
f90d5fea
PZ
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%description
7d3ef1a6
JB
54HTML parser/tokenizer based on the WHATWG HTML5 specification.
55
56%description -l pl.UTF-8
57Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5.
f90d5fea 58
9ef7658b
JB
59%package -n python3-%{module}
60Summary: HTML parser/tokenizer based on the WHATWG HTML5 specification
61Summary(pl.UTF-8): Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5
62Group: Libraries/Python
63Requires: python3-modules >= 1:3.3
64
65%description -n python3-%{module}
66HTML parser/tokenizer based on the WHATWG HTML5 specification.
67
68%description -n python3-%{module} -l pl.UTF-8
69Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5.
70
f90d5fea 71%prep
4b8ba435 72%setup -q -n %{module}-python-%{version}
f90d5fea
PZ
73
74%build
9ef7658b 75%if %{with python2}
90ae2c8f 76%py_build
9ef7658b
JB
77%endif
78
79%if %{with python3}
80%py3_build
81%endif
f90d5fea
PZ
82
83%install
84rm -rf $RPM_BUILD_ROOT
4b8ba435 85
9ef7658b 86%if %{with python2}
90ae2c8f 87%py_install
f90d5fea 88
7d3ef1a6 89%py_postclean
9ef7658b
JB
90%endif
91
92%if %{with python3}
93%py3_install
94%endif
f90d5fea
PZ
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
9ef7658b 99%if %{with python2}
f90d5fea
PZ
100%files
101%defattr(644,root,root,755)
9ef7658b
JB
102%doc AUTHORS.rst CHANGES.rst LICENSE README.rst
103%{py_sitescriptdir}/html5lib-%{version}-py*.egg-info
104%{py_sitescriptdir}/html5lib
105%endif
106
107%if %{with python3}
108%files -n python3-%{module}
109%defattr(644,root,root,755)
110%doc AUTHORS.rst CHANGES.rst LICENSE README.rst
111%{py3_sitescriptdir}/html5lib-%{version}-py*.egg-info
112%{py3_sitescriptdir}/html5lib
113%endif
This page took 0.153765 seconds and 4 git commands to generate.