Reduce Python 2 build dependencies

This commit is contained in:
Miro Hrončok 2019-08-26 13:22:13 +02:00
parent 7eca60e7a9
commit 63d8f6fb84

View File

@ -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: 5%{?dist} Release: 6%{?dist}
Epoch: 1 Epoch: 1
License: MIT License: MIT
URL: https://github.com/html5lib/html5lib-python URL: https://github.com/html5lib/html5lib-python
@ -25,6 +25,7 @@ Summary: %summary
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python2-setuptools BuildRequires: python2-setuptools
%if 0%{?fedora} < 32
# Test deps # Test deps
BuildRequires: python2-mock BuildRequires: python2-mock
BuildRequires: python2-pytest BuildRequires: python2-pytest
@ -35,6 +36,7 @@ BuildRequires: python2-webencodings
BuildRequires: python2-chardet BuildRequires: python2-chardet
BuildRequires: python2-genshi BuildRequires: python2-genshi
BuildRequires: python2-lxml BuildRequires: python2-lxml
%endif
%{?python_provide:%python_provide python2-%{srcname}} %{?python_provide:%python_provide python2-%{srcname}}
@ -85,6 +87,7 @@ specification for maximum compatibility with major desktop web browsers.
# 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 # we don't have python2-pytest-expect, this is a workaround
sed -i \ sed -i \
-e 's/config.option.update_xfail/False/' \ -e 's/config.option.update_xfail/False/' \
@ -98,6 +101,7 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt
# workaround ends here # workaround ends here
%{__python2} -m pytest %{__python2} -m pytest
%endif
%files -n python2-%{srcname} %files -n python2-%{srcname}
@ -114,6 +118,9 @@ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt
%changelog %changelog
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-6
- Reduce Python 2 build dependencies
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-5 * Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-5
- Rebuilt for Python 3.8 - Rebuilt for Python 3.8