| |
@@ -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 @@
|
| |
|
| |
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 @@
|
| |
|
| |
%py2_install
|
| |
|
| |
-
|
| |
+ %if %{with tests}
|
| |
%check
|
| |
export PYTHONPATH=.:$PYTHONPATH
|
| |
py.test testing
|
| |
@@ -74,6 +82,7 @@
|
| |
%if 0%{?with_python3}
|
| |
py.test-%{python3_version} testing
|
| |
%endif
|
| |
+ %endif # with tests
|
| |
|
| |
|
| |
%files -n python2-%{pypiname}
|
| |