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