Update to 1.0.1 (#1584176), run some tests (#1593231)

This commit is contained in:
Miro Hrončok 2018-08-21 00:22:12 +02:00
parent e4e13ab47e
commit 3dc5755f57
3 changed files with 76 additions and 61 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/html5lib-1.0b2.tar.gz /html5lib-1.0b2.tar.gz
/html5lib-0.999.tar.gz /html5lib-0.999.tar.gz
/0.999999999.tar.gz /0.999999999.tar.gz
/html5lib-1.0.1.tar.gz

View File

@ -1,100 +1,114 @@
%global modulename html5lib %global srcname html5lib
%if 0%{?fedora} || 0%{?rhel} > 7 Name: python-%{srcname}
%global with_python3 1 Summary: A python based HTML parser/tokenizer
%endif Version: 1.0.1
Release: 1%{?dist}
Epoch: 1
License: MIT
URL: https://github.com/html5lib/html5lib-python
Source0: %pypi_source
BuildArch: noarch
Name: python-%{modulename} %?python_enable_dependency_generator
Summary: A python based HTML parser/tokenizer
Version: 0.999999999
Release: 8%{?dist}
Epoch: 1
Group: Development/Libraries
License: MIT
URL: https://pypi.python.org/pypi/%{modulename}
Source0: https://github.com/html5lib/html5lib-python/archive/%{version}.tar.gz
BuildArch: noarch
%description %description
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.
%package -n python2-%{modulename}
Summary: A python based HTML parser/tokenizer
Group: Development/Libraries
Requires: python2-six %package -n python2-%{srcname}
Requires: python2-webencodings Summary: %summary
BuildRequires: python2-setuptools BuildRequires: python2-devel
BuildRequires: python2-devel BuildRequires: python2-setuptools
BuildRequires: python2-nose
BuildRequires: python2-six
%{?python_provide:%python_provide python2-%{modulename}}
%description -n python2-%{modulename} # Test deps
BuildRequires: python2-mock
BuildRequires: python2-pytest
BuildRequires: python2-six
BuildRequires: python2-webencodings
# Optional test deps:
BuildRequires: python2-chardet
BuildRequires: python2-genshi
BuildRequires: python2-lxml
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
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.
%if 0%{?with_python3}
%package -n python3-%{modulename}
Summary: A python based HTML parser/tokenizer
Group: Development/Libraries
Requires: python3-six %package -n python3-%{srcname}
Requires: python3-webencodings Summary: %summary
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-nose
BuildRequires: python3-six
%{?python_provide:%python_provide python3-%{modulename}}
%description -n python3-%{modulename} # Test deps
BuildRequires: python3-mock
BuildRequires: python3-pytest
BuildRequires: python3-six
BuildRequires: python3-webencodings
# Optional test deps:
BuildRequires: python3-chardet
BuildRequires: python3-genshi
BuildRequires: python3-lxml
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
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.
%endif
%prep %prep
%autosetup -n %{modulename}-python-%{version} %autosetup -n %{srcname}-%{version}
%build %build
%py2_build %py2_build
%if 0%{?with_python3}
%py3_build %py3_build
%endif
%install %install
%if 0%{?with_python3}
%py3_install
%endif
%py2_install %py2_install
%py3_install
#check
#nosetests-%{python2_version}
# we need python-webencodings packaged
#if 0%{?with_python3} %check
#nosetests-%{python3_version} # we don't have pytest-expect, this is hack, TODO: package pytest-expect
#endif sed -i \
-e 's/config.option.update_xfail/False/' \
-e 's/^fail_if_missing_pytest_expect.*//' \
html5lib/tests/conftest.py
%files -n python2-%{modulename} # there are hundreds of tests in here, but lot of them xfail only with pytest-expect:
mv html5lib/tests/testdata{,_nope}
mkdir -p html5lib/tests/testdata/encoding/chardet/
cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt
# hack ends here
%{__python2} -m pytest
%{__python3} -m pytest
%files -n python2-%{srcname}
%license LICENSE %license LICENSE
%doc CHANGES.rst README.rst %doc CHANGES.rst README.rst
%{python2_sitelib}/%{modulename}-*.egg-info %{python2_sitelib}/%{srcname}-*.egg-info/
%{python2_sitelib}/%{modulename} %{python2_sitelib}/%{srcname}/
%if 0%{?with_python3} %files -n python3-%{srcname}
%files -n python3-%{modulename}
%license LICENSE %license LICENSE
%doc CHANGES.rst README.rst %doc CHANGES.rst README.rst
%{python3_sitelib}/%{modulename}-*.egg-info %{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{modulename} %{python3_sitelib}/%{srcname}/
%endif
%changelog %changelog
* Mon Aug 20 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-1
- Update to 1.0.1 (#1584176)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999999999-8 * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999999999-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (0.999999999.tar.gz) = 74205c25ea38a1a0690181d56bdf4560ef36cf0d39acbb1ab16e2199e3657f87636508ba128d522970876c9a0ba2ac8df877053ff0179403668a2f0300af7877 SHA512 (html5lib-1.0.1.tar.gz) = 35939b4450893864da04e735ee5e0addacf1dd34bae6a6909c76572abf6bfded446a78a713dfde91c1485ba45867d7abeb6a45cf0545c16ea968707be7de5dd2