Don't run %check with Python 2 on Fedora 32+

We will be removing python2-pytest anyway and this allows us to remove packages
more gradually.
This commit is contained in:
Miro Hrončok 2019-09-14 00:23:41 +02:00
parent f78420c0e3
commit 81ff709e18

View File

@ -2,7 +2,7 @@
Name: python-%{modname}
Version: 2.8.0
Release: 5%{?dist}
Release: 6%{?dist}
Epoch: 1
Summary: Powerful extensions to the standard datetime module
@ -28,7 +28,7 @@ Summary: %summary
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-setuptools_scm
%if %{with tests}
%if %{with tests} && 0%{?fedora} < 32
BuildRequires: python2-freezegun
BuildRequires: python2-pytest
BuildRequires: python2-six
@ -79,6 +79,7 @@ make -C docs html
%check
%{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning
%if 0%{?fedora} < 32
# Tests skipped on Python 2:
# dateutil/test/property: Tests using python2-hypothesis are skipped to break
# up dependency loops as the Python 2 stack is being removed form Fedora.
@ -88,6 +89,7 @@ make -C docs html
--ignore dateutil/test/property \
-k 'not gettz_badzone_unicode'
%endif
%endif
%files -n python2-%{modname}
%license LICENSE
@ -106,6 +108,9 @@ make -C docs html
%doc docs/_build/html
%changelog
* Fri Sep 13 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-6
- Reduce Python 2 build dependencies on Fedora 32
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-5
- Rebuilt for Python 3.8