From 54cd2afa782046f7e83a81532f65076ba742754c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 26 Aug 2019 13:08:51 +0200 Subject: [PATCH] Don't test Python 2 on Fedora 31+ --- python-six.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-six.spec b/python-six.spec index f674e77..eadac62 100644 --- a/python-six.spec +++ b/python-six.spec @@ -1,7 +1,9 @@ %global modname six +# tests are enabled by default, but on Fedora 32+, Python 2 tests are skipped %bcond_without tests +# python2 is enabled by default, Fedora 32+ exception is anticipated %bcond_without python2 %global python_wheelname %{modname}-%{version}-py2.py3-none-any.whl @@ -30,7 +32,7 @@ Summary: %{summary} BuildRequires: python2-devel BuildRequires: python2-setuptools -%if %{with tests} +%if %{with tests} && 0%{?fedora} < 32 BuildRequires: python2-pytest BuildRequires: python2-tkinter %endif @@ -79,8 +81,9 @@ Python 3 version. %if %{with tests} %check -# Ensure six module is used from the version being installed +%if 0%{?fedora} < 32 PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -rfsxX test_six.py +%endif PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -rfsxX test_six.py %endif