[packages/python-pytest] - pytest.py seems required for some tests; release 2
qboosh
qboosh at pld-linux.org
Mon Mar 6 20:41:16 CET 2017
commit 08c08cc150d155a57097216416b35a320a6f5ad7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Mar 6 20:43:21 2017 +0100
- pytest.py seems required for some tests; release 2
python-pytest.spec | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/python-pytest.spec b/python-pytest.spec
index f161b23..4f8b73a 100644
--- a/python-pytest.spec
+++ b/python-pytest.spec
@@ -1,6 +1,7 @@
#
# Conditional build:
%bcond_without doc # HTML documentation build
+%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define pylib_version 1.4.29
@@ -9,21 +10,18 @@ Summary: Simple and popular testing tool for Python
Summary(pl.UTF-8): Proste i popularne narzędzie testujące dla Pythona
Name: python-%{module}
Version: 2.9.2
-Release: 1
+Release: 2
License: MIT
Group: Development/Languages/Python
#Source0Download: https://pypi.python.org/simple/pytest
Source0: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
# Source0-md5: b65c2944dfaa0efb62c0239afb424f5b
URL: http://pytest.org/
+%if %{with python2}
BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-modules >= 1:2.6
BuildRequires: python-py >= %{pylib_version}
BuildRequires: python-setuptools >= 7.0
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: sed >= 4.0
-%if %{with doc}
-BuildRequires: sphinx-pdg >= 1.0
%endif
%if %{with python3}
BuildRequires: python3-devel >= 1:3.3
@@ -31,7 +29,12 @@ BuildRequires: python3-modules >= 1:3.3
BuildRequires: python3-py >= %{pylib_version}
BuildRequires: python3-setuptools >= 7.0
%endif
-Requires: python-py >= %{pylib_version}
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: sed >= 4.0
+%if %{with doc}
+BuildRequires: sphinx-pdg >= 1.0
+%endif
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -45,7 +48,6 @@ py.test to proste i popularne narzędzie testujące dla Pythona.
Summary: Simple powerful testing with Python
Summary(pl.UTF-8): Proste, ale funkcjonalne narzędzie testujące dla Pythona
Group: Development/Languages
-Requires: python3-py >= %{pylib_version}
Suggests: python3-setuptools
%description -n python3-pytest
@@ -70,7 +72,9 @@ Dokumentacja pakietu Pythona py.test.
%setup -q -n %{module}-%{version}
%build
+%if %{with python2}
%py_build
+%endif
%if %{with python3}
%py3_build
@@ -94,21 +98,26 @@ rm -rf $RPM_BUILD_ROOT
%py3_install
%endif
+%if %{with python2}
%py_install
-%py_postclean
+# pytest.py source seems required for "monkeypatching" tests
+%py_postclean -x pytest.py
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc AUTHORS CHANGELOG.rst LICENSE README.rst
%attr(755,root,root) %{_bindir}/py.test
%attr(755,root,root) %{_bindir}/py.test-%{py_ver}
-%{py_sitescriptdir}/pytest.py[co]
+%{py_sitescriptdir}/pytest.py*
%{py_sitescriptdir}/_pytest
%{py_sitescriptdir}/pytest-%{version}-py*.egg-info
+%endif
%if %{with python3}
%files -n python3-pytest
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pytest.git/commitdiff/08c08cc150d155a57097216416b35a320a6f5ad7
More information about the pld-cvs-commit
mailing list