[packages/python-process_tests] - disable python3 here, release 7

qboosh qboosh at pld-linux.org
Sun Jun 29 16:49:22 CEST 2025


commit 70c71bb6714906c845878c75469b7feb5e627179
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jun 29 16:50:48 2025 +0200

    - disable python3 here, release 7

 python-process_tests.spec | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/python-process_tests.spec b/python-process_tests.spec
index 241bcb4..66c1ee8 100644
--- a/python-process_tests.spec
+++ b/python-process_tests.spec
@@ -1,13 +1,15 @@
 #
 # Conditional 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-process_tests.spec)
+%bcond_with	tests	# unit tests (empty as of 2.1.2)
 
 Summary:	Tools for testing processes
 Summary(pl.UTF-8):	Narzędzia do testowania procesów
 Name:		python-process_tests
+# keep 2.x here for python2 support
 Version:	2.1.2
-Release:	6
+Release:	7
 License:	BSD
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/process-tests/
@@ -17,10 +19,16 @@ URL:		https://github.com/ionelmc/python-process-tests
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -52,10 +60,22 @@ Narzędzia do testowania procesów.
 %build
 %if %{with python2}
 %py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python} -m pytest tests
+%endif
 %endif
 
 %if %{with python3}
 %py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
 %endif
 
 %install
@@ -77,7 +97,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc LICENSE README.rst
+%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
 %{py_sitescriptdir}/process_tests.py[co]
 %{py_sitescriptdir}/process_tests-%{version}-py*.egg-info
 %endif
@@ -85,7 +105,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-process_tests
 %defattr(644,root,root,755)
-%doc LICENSE README.rst
+%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
 %{py3_sitescriptdir}/process_tests.py
 %{py3_sitescriptdir}/__pycache__/process_tests.cpython-*.py[co]
 %{py3_sitescriptdir}/process_tests-%{version}-py*.egg-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-process_tests.git/commitdiff/70c71bb6714906c845878c75469b7feb5e627179



More information about the pld-cvs-commit mailing list