[packages/python-pytest] - disable python3 here; drop pytest, py.test links from python2 package
qboosh
qboosh at pld-linux.org
Tue Feb 16 21:36:21 CET 2021
commit 23d34d202e01192866e581c0ce98951483472826
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 16 21:36:54 2021 +0100
- disable python3 here; drop pytest, py.test links from python2 package
python-pytest.spec | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/python-pytest.spec b/python-pytest.spec
index 3e4f4b5..c3c8e14 100644
--- a/python-pytest.spec
+++ b/python-pytest.spec
@@ -3,7 +3,7 @@
# Conditional build:
%bcond_without doc # HTML documentation build
%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
+%bcond_with python3 # CPython 3.x module (built from python3-pytest.spec)
%bcond_without tests # unit tests
%define pylib_version 1.5.0
@@ -13,7 +13,7 @@ Summary(pl.UTF-8): Proste i popularne narzędzie testujące dla Pythona
# note: keep 4.x here for python2 support
Name: python-%{module}
Version: 4.6.11
-Release: 1
+Release: 2
License: MIT
Group: Development/Languages/Python
#Source0Download: https://pypi.org/simple/pytest/
@@ -177,23 +177,23 @@ done
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python3}
-%py3_install
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-3}
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-3}
-%endif
-
%if %{with python2}
%py_install
-ln $RPM_BUILD_ROOT%{_bindir}/py.test{,-2}
-ln $RPM_BUILD_ROOT%{_bindir}/pytest{,-2}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-2}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-2}
# pytest.py source seems required for "monkeypatching" tests
%py_postclean -x pytest.py
%endif
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/py.test{,-3}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/pytest{,-3}
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -201,9 +201,7 @@ rm -rf $RPM_BUILD_ROOT
%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-2
-%attr(755,root,root) %{_bindir}/pytest
%attr(755,root,root) %{_bindir}/pytest-2
%{py_sitescriptdir}/pytest.py*
%{py_sitescriptdir}/_pytest
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pytest.git/commitdiff/23d34d202e01192866e581c0ce98951483472826
More information about the pld-cvs-commit
mailing list