From 3bf10ec0e919386ccbeec9a4cffc05613a1a24f1 Mon Sep 17 00:00:00 2001 From: Carl George Date: May 03 2019 17:32:05 +0000 Subject: Run python2 tests on EL7 --- diff --git a/python-pdir2.spec b/python-pdir2.spec index 2444a58..2aacdf9 100644 --- a/python-pdir2.spec +++ b/python-pdir2.spec @@ -14,15 +14,14 @@ bpython, and Jupyter Notebook.} %if (%{defined fedora} && 0%{?fedora} < 30) || (%{defined rhel} && 0%{?rhel} < 8) %bcond_without python2 +%bcond_without python2_tests %endif %bcond_without python3 - -# Run the test on Fedora. In EPEL, we're missing: -# - python34-pandas -# - python36-pandas -# - python36-pytest -%{?fedora:%bcond_without tests} +%if %{defined fedora} +# missing python36-pandas in EPEL +%bcond_without python3_tests +%endif # Upstream tag doesn't match the version %global tag 0.3.1 @@ -49,7 +48,7 @@ BuildArch: noarch Summary: %{summary} BuildRequires: python2-devel BuildRequires: python2-setuptools -%if %{with tests} +%if %{with python2_tests} BuildRequires: python2-pytest >= 2.4 BuildRequires: python2-pandas BuildRequires: python2-enum34 @@ -67,7 +66,7 @@ Requires: python2-enum34 Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools -%if %{with tests} +%if %{with python3_tests} BuildRequires: python%{python3_pkgversion}-pytest >= 2.4 BuildRequires: python%{python3_pkgversion}-pandas %endif @@ -92,11 +91,9 @@ BuildRequires: python%{python3_pkgversion}-pandas %{?with_python3:%py3_install} -%if %{with tests} %check -%{?with_python2:PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} --verbose} -%{?with_python3:PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose} -%endif +%{?with_python2_tests:PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} --verbose} +%{?with_python3_tests:PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose} %if %{with python2} @@ -122,6 +119,7 @@ BuildRequires: python%{python3_pkgversion}-pandas - Latest upstream - Drop python3_other subpackage - Disable python2 subpackage on EL8 +- Run python2 tests on EL7 * Sat Feb 02 2019 Fedora Release Engineering - 0.3.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild