|
|
@ -2,7 +2,7 @@
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Summary: A python based HTML parser/tokenizer
|
|
|
|
Summary: A python based HTML parser/tokenizer
|
|
|
|
Version: 1.0.1
|
|
|
|
Version: 1.0.1
|
|
|
|
Release: 6%{?dist}
|
|
|
|
Release: 7%{?dist}
|
|
|
|
Epoch: 1
|
|
|
|
Epoch: 1
|
|
|
|
License: MIT
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/html5lib/html5lib-python
|
|
|
|
URL: https://github.com/html5lib/html5lib-python
|
|
|
@ -20,31 +20,6 @@ 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-%{srcname}
|
|
|
|
|
|
|
|
Summary: %summary
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 32
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
|
|
|
|
A python based HTML parser/tokenizer based on the WHATWG HTML5
|
|
|
|
|
|
|
|
specification for maximum compatibility with major desktop web browsers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
Summary: %summary
|
|
|
|
Summary: %summary
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
@ -73,42 +48,17 @@ specification for maximum compatibility with major desktop web browsers.
|
|
|
|
%autosetup -p1 -n %{srcname}-%{version}
|
|
|
|
%autosetup -p1 -n %{srcname}-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%py2_build
|
|
|
|
|
|
|
|
%py3_build
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%py2_install
|
|
|
|
|
|
|
|
%py3_install
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
# we have python3-pytest-expect, so python3 tests first
|
|
|
|
|
|
|
|
# XXX figure out the failure in test_encoding
|
|
|
|
# XXX figure out the failure in test_encoding
|
|
|
|
%{__python3} -m pytest -k "not test_encoding"
|
|
|
|
%{__python3} -m pytest -k "not test_encoding"
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 32
|
|
|
|
|
|
|
|
# we don't have python2-pytest-expect, this is a workaround
|
|
|
|
|
|
|
|
sed -i \
|
|
|
|
|
|
|
|
-e 's/config.option.update_xfail/False/' \
|
|
|
|
|
|
|
|
-e 's/^fail_if_missing_pytest_expect.*//' \
|
|
|
|
|
|
|
|
html5lib/tests/conftest.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# workaround ends here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{__python2} -m pytest
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%doc CHANGES.rst README.rst
|
|
|
|
|
|
|
|
%{python2_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
|
|
|
|
%{python2_sitelib}/%{srcname}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
%license LICENSE
|
|
|
|
%license LICENSE
|
|
|
@ -118,6 +68,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Mon Sep 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-7
|
|
|
|
|
|
|
|
- Drop python2-html5lib
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-6
|
|
|
|
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-6
|
|
|
|
- Reduce Python 2 build dependencies
|
|
|
|
- Reduce Python 2 build dependencies
|
|
|
|
|
|
|
|
|
|
|
|