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