Drop python2-html5lib
This commit is contained in:
parent
63d8f6fb84
commit
4f49aca776
@ -2,7 +2,7 @@
|
||||
Name: python-%{srcname}
|
||||
Summary: A python based HTML parser/tokenizer
|
||||
Version: 1.0.1
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Epoch: 1
|
||||
License: MIT
|
||||
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.
|
||||
|
||||
|
||||
%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}
|
||||
Summary: %summary
|
||||
BuildRequires: python3-devel
|
||||
@ -73,42 +48,17 @@ specification for maximum compatibility with major desktop web browsers.
|
||||
%autosetup -p1 -n %{srcname}-%{version}
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
|
||||
%check
|
||||
# we have python3-pytest-expect, so python3 tests first
|
||||
# XXX figure out the failure in 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}
|
||||
%license LICENSE
|
||||
@ -118,6 +68,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt
|
||||
|
||||
|
||||
%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
|
||||
- Reduce Python 2 build dependencies
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user