diff --git a/python-pluggy.spec b/python-pluggy.spec index 97a696e..1dd7851 100644 --- a/python-pluggy.spec +++ b/python-pluggy.spec @@ -6,6 +6,9 @@ %global with_python3 0 %endif +# Turn the tests off when bootstrapping Python, because pytest requires pluggy +%bcond_without tests + Name: python-pluggy Version: 0.6.0 Release: 2%{?dist} @@ -18,12 +21,17 @@ Source0: https://github.com/pytest-dev/%{pypiname}/archive/%{version}.tar BuildArch: noarch BuildRequires: python2-devel -BuildRequires: python2-pytest BuildRequires: python2-setuptools +%if %{with tests} +BuildRequires: python2-pytest +%endif + %if 0%{?with_python3} BuildRequires: python3-devel -BuildRequires: python3-pytest BuildRequires: python3-setuptools +%if %{with tests} +BuildRequires: python3-pytest +%endif %endif # with python3 %global _description\ @@ -66,7 +74,7 @@ The plugin manager stripped of pytest specific details. %py2_install - +%if %{with tests} %check export PYTHONPATH=.:$PYTHONPATH py.test testing @@ -74,6 +82,7 @@ py.test testing %if 0%{?with_python3} py.test-%{python3_version} testing %endif +%endif # with tests %files -n python2-%{pypiname}