Ship python2-html5lib

Modernize spec
Use %license
epel9
Orion Poplawski 8 years ago
parent bf3e7d8ed5
commit 5580b93d3d

@ -6,7 +6,7 @@
Name: python-%{modulename} Name: python-%{modulename}
Summary: A python based HTML parser/tokenizer Summary: A python based HTML parser/tokenizer
Version: 0.999 Version: 0.999
Release: 10%{?dist} Release: 11%{?dist}
Epoch: 1 Epoch: 1
Group: Development/Libraries Group: Development/Libraries
License: MIT License: MIT
@ -17,13 +17,23 @@ Source0: https://pypi.python.org/packages/source/h/%{modulename}/%{modulename}-%
Patch0: fix-invalid-escape-sequences.patch Patch0: fix-invalid-escape-sequences.patch
BuildArch: noarch BuildArch: noarch
%description
A python based HTML parser/tokenizer based on the WHATWG HTML5
specification for maximum compatibility with major desktop web browsers.
%package -n python2-%{modulename}
Summary: A python based HTML parser/tokenizer
Group: Development/Libraries
Requires: python-six Requires: python-six
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python-nose BuildRequires: python-nose
BuildRequires: python-six BuildRequires: python-six
%{?python_provide;%python_provide python2-%{modulename}}
%description %description -n python2-%{modulename}
A python based HTML parser/tokenizer based on the WHATWG HTML5 A python based HTML parser/tokenizer based on the WHATWG HTML5
specification for maximum compatibility with major desktop web browsers. specification for maximum compatibility with major desktop web browsers.
@ -34,10 +44,10 @@ Group: Development/Libraries
Requires: python3-six Requires: python3-six
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python-tools BuildRequires: python3-setuptools
BuildRequires: python3-nose BuildRequires: python3-nose
BuildRequires: python3-six BuildRequires: python3-six
BuildRequires: python3-setuptools %{?python_provide;%python_provide python3-%{modulename}}
%description -n python3-%{modulename} %description -n python3-%{modulename}
A python based HTML parser/tokenizer based on the WHATWG HTML5 A python based HTML parser/tokenizer based on the WHATWG HTML5
@ -49,54 +59,50 @@ specification for maximum compatibility with major desktop web browsers.
%setup -q -n %{modulename}-%{version} %setup -q -n %{modulename}-%{version}
%patch0 -p1 %patch0 -p1
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build %build
%{__python} setup.py build %py2_build
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} %py3_build
%{__python3} setup.py build
popd
%endif %endif
%install %install
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} %py3_install
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
%endif %endif
%{__python} setup.py install -O1 --skip-build --root %{buildroot} %py2_install
%check %check
nosetests nosetests-%{python2_version}
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir}
nosetests-%{python3_version} nosetests-%{python3_version}
popd
%endif %endif
%files %files -n python2-%{modulename}
%doc CHANGES.rst README.rst LICENSE %license LICENSE
%doc CHANGES.rst README.rst
%{python_sitelib}/%{modulename}-*.egg-info %{python_sitelib}/%{modulename}-*.egg-info
%{python_sitelib}/%{modulename} %{python_sitelib}/%{modulename}
%if 0%{?with_python3} %if 0%{?with_python3}
%files -n python3-%{modulename} %files -n python3-%{modulename}
%doc CHANGES.rst LICENSE README.rst %license LICENSE
%doc CHANGES.rst README.rst
%{python3_sitelib}/%{modulename}-*.egg-info %{python3_sitelib}/%{modulename}-*.egg-info
%{python3_sitelib}/%{modulename} %{python3_sitelib}/%{modulename}
%endif %endif
%changelog %changelog
* Fri Dec 30 2016 Orion Poplawski <orion@cora.nwra.com> - 1:0.999-11
- Ship python2-html5lib
- Modernize spec
- Use %%license
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1:0.999-10 * Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1:0.999-10
- Rebuild for Python 3.6 - Rebuild for Python 3.6
- Fix invalid escape sequences - Fix invalid escape sequences

Loading…
Cancel
Save