| |
@@ -4,6 +4,8 @@
|
| |
|
| |
%global bname path
|
| |
|
| |
+ %bcond_without tests
|
| |
+
|
| |
Name: python-%{bname}
|
| |
Version: 5.2
|
| |
Release: 16%{?dist}
|
| |
@@ -15,13 +17,17 @@
|
| |
|
| |
BuildArch: noarch
|
| |
BuildRequires: python2-devel
|
| |
+ %if %{with tests}
|
| |
BuildRequires: pytest
|
| |
+ %endif
|
| |
|
| |
%if 0%{?with_python3}
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: python3-setuptools
|
| |
+ %if %{with tests}
|
| |
BuildRequires: python3-pytest
|
| |
%endif
|
| |
+ %endif
|
| |
|
| |
%description
|
| |
path.py implements a path objects as first-class entities,
|
| |
@@ -60,6 +66,7 @@
|
| |
|
| |
%py2_build
|
| |
|
| |
+ %if %{with tests}
|
| |
%check
|
| |
pushd build/lib
|
| |
LC_ALL=C.UTF-8 py.test-2 -v
|
| |
@@ -71,6 +78,7 @@
|
| |
py.test-%{python3_version} -v
|
| |
popd
|
| |
%endif
|
| |
+ %endif # with tests
|
| |
|
| |
%install
|
| |
%if 0%{?with_python3}
|
| |
With python-path depending on pytest, and pytest in turn depending on python-path... well... resolved.