]>
Commit | Line | Data |
---|---|---|
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 |
8 | Summary: HTML parser/tokenizer based on the WHATWG HTML5 specification | |
7d3ef1a6 | 9 | Summary(pl.UTF-8): Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5 |
f90d5fea | 10 | Name: python-%{module} |
9ef7658b | 11 | Version: 0.999999999 |
4b8ba435 | 12 | Release: 1 |
f90d5fea PZ |
13 | License: MIT |
14 | Group: Libraries/Python | |
4b8ba435 JB |
15 | #Source0Download: https://github.com/html5lib/html5lib-python/releases |
16 | Source0: https://github.com/html5lib/html5lib-python/archive/%{version}/%{module}-%{version}.tar.gz | |
9ef7658b | 17 | # Source0-md5: a81446ef3ce3ef18f5e8e242b7072b83 |
4b8ba435 | 18 | URL: https://github.com/html5lib/ |
9ef7658b JB |
19 | %if %{with python2} |
20 | BuildRequires: python-devel >= 1:2.6 | |
21 | BuildRequires: python-setuptools >= 18.5 | |
22 | %if %{with tests} | |
23 | BuildRequires: python-flake8 | |
24 | BuildRequires: python-mock | |
25 | %if "%{py_ver}" < "2.7" | |
26 | BuildRequires: python-ordereddict | |
27 | %endif | |
28 | BuildRequires: python-pytest | |
29 | BuildRequires: python-pytest-expect >= 1.1 | |
30 | BuildRequires: python-pytest-expect < 2.0 | |
31 | BuildRequires: python-six | |
32 | BuildRequires: python-webencodings | |
33 | %endif | |
34 | %endif | |
35 | %if %{with python3} | |
36 | BuildRequires: python3-devel >= 1:3.3 | |
37 | BuildRequires: python3-setuptools >= 18.5 | |
38 | %if %{with tests} | |
39 | BuildRequires: python3-flake8 | |
40 | BuildRequires: python3-pytest | |
41 | BuildRequires: python3-pytest-expect >= 1.1 | |
42 | BuildRequires: python3-pytest-expect < 2.0 | |
43 | BuildRequires: python3-six | |
44 | BuildRequires: python3-webencodings | |
45 | %endif | |
46 | %endif | |
7d3ef1a6 | 47 | BuildRequires: rpm-pythonprov |
4b8ba435 | 48 | BuildRequires: rpmbuild(macros) >= 1.714 |
9ef7658b | 49 | Requires: python-modules >= 1:2.6 |
7d3ef1a6 | 50 | BuildArch: noarch |
f90d5fea PZ |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
52 | ||
53 | %description | |
7d3ef1a6 JB |
54 | HTML parser/tokenizer based on the WHATWG HTML5 specification. |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5. | |
f90d5fea | 58 | |
9ef7658b JB |
59 | %package -n python3-%{module} |
60 | Summary: HTML parser/tokenizer based on the WHATWG HTML5 specification | |
61 | Summary(pl.UTF-8): Analizator i tokenizer HTML-a oparty na specyfikacji WHATWG HTML5 | |
62 | Group: Libraries/Python | |
63 | Requires: python3-modules >= 1:3.3 | |
64 | ||
65 | %description -n python3-%{module} | |
66 | HTML parser/tokenizer based on the WHATWG HTML5 specification. | |
67 | ||
68 | %description -n python3-%{module} -l pl.UTF-8 | |
69 | Analizator 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 | |
84 | rm -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 | |
97 | rm -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 |