[packages/python3-zope.testrunner] - python-zope.testrunner.spec updated to 7.2 for python 3.9+
qboosh
qboosh at pld-linux.org
Mon Apr 21 21:55:38 CEST 2025
commit 5c7c2d45175a2c2ee8afe72f9366283085d97241
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Apr 21 21:50:24 2025 +0200
- python-zope.testrunner.spec updated to 7.2 for python 3.9+
...testrunner.spec => python3-zope.testrunner.spec | 99 +++++-----------------
1 file changed, 22 insertions(+), 77 deletions(-)
---
diff --git a/python-zope.testrunner.spec b/python3-zope.testrunner.spec
similarity index 57%
rename from python-zope.testrunner.spec
rename to python3-zope.testrunner.spec
index c4a5322..8741c5c 100644
--- a/python-zope.testrunner.spec
+++ b/python3-zope.testrunner.spec
@@ -2,43 +2,26 @@
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests (running fails?)
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
Summary: Flexible test runner with layer support
Summary(pl.UTF-8): Elastyczne uruchamianie testów z obsługą warstw
-Name: python-zope.testrunner
-# keep 5.x here for python2 support
-Version: 5.6
-Release: 3
+Name: python3-zope.testrunner
+Version: 7.2
+Release: 1
License: ZPL v2.1
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/zope.testrunner/
-Source0: https://files.pythonhosted.org/packages/source/z/zope.testrunner/zope.testrunner-%{version}.tar.gz
-# Source0-md5: 4800710607c36bd00e6771738c208eaa
+Source0: https://files.pythonhosted.org/packages/source/z/zope.testrunner/zope_testrunner-%{version}.tar.gz
+# Source0-md5: 9e41c200a79a18e33a631a2b5cf7c678
URL: https://www.zope.org/
-%if %{with python2}
-BuildRequires: python >= 1:2.7
-BuildRequires: python-devel >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-six
-BuildRequires: python-zope.exceptions
-BuildRequires: python-zope.interface
-BuildRequires: python-zope.testing
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3 >= 1:3.5
-BuildRequires: python3-devel >= 1:3.5
+BuildRequires: python3 >= 1:3.9
+BuildRequires: python3-devel >= 1:3.9
BuildRequires: python3-setuptools
%if %{with tests}
-BuildRequires: python3-six
BuildRequires: python3-zope.exceptions
BuildRequires: python3-zope.interface
BuildRequires: python3-zope.testing
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
@@ -46,8 +29,8 @@ BuildRequires: python3-sphinxcontrib-programoutput
BuildRequires: python3-zope.exceptions
BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.7
-Requires: python-zope-base
+Requires: python3-modules >= 1:3.9
+Requires: python3-zope-base
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -57,29 +40,16 @@ This package provides a flexible test runner with layer support.
%description -l pl.UTF-8
Ten pakiet zapewnia elastyczne uruchamianie testów z obsługą warstw.
-%package -n python3-zope.testrunner
-Summary: Flexible test runner with layer support
-Summary(pl.UTF-8): Elastyczne uruchamianie testów z obsługą warstw
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.5
-Requires: python3-zope-base
-
-%description -n python3-zope.testrunner
-This package provides a flexible test runner with layer support.
-
-%description -n python3-zope.testrunner -l pl.UTF-8
-Ten pakiet zapewnia elastyczne uruchamianie testów z obsługą warstw.
-
-%package -n python3-zope.testrunner-examples
+%package examples
Summary: Example tests for zope.testrunner
Summary(pl.UTF-8): Przykładowe testy dla szkieletu zope.testrunner
Group: Development/Tools
-Requires: python3-zope.testrunner = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
-%description -n python3-zope.testrunner-examples
+%description examples
Example tests for zope.testrunner.
-%description -n python3-zope.testrunner-examples -l pl.UTF-8
+%description examples -l pl.UTF-8
Przykładowe testy dla szkieletu zope.testrunner.
%package apidocs
@@ -94,15 +64,14 @@ API documentation for Python zope.testrunner module.
Dokumentacja API modułu Pythona zope.testrunner.
%prep
-%setup -q -n zope.testrunner-%{version}
+%setup -q -n zope_testrunner-%{version}
%build
-%if %{with python2}
-%py_build %{?with_tests:test}
-%endif
+%py3_build
-%if %{with python3}
-%py3_build %{?with_tests:test}
+%if %{with tests}
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m zope.testrunner --test-path=src
%endif
%if %{with doc}
@@ -113,20 +82,7 @@ sphinx-build-3 -b html docs docs/_build/html
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install \
- --install-purelib=%{py_sitescriptdir}
-
-%py_postclean
-# python2 test examples are useless because of postclean
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/testrunner/tests
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/zope-testrunner{,-2}
-%endif
-
-%if %{with python3}
-%py3_install \
- --install-purelib=%{py3_sitescriptdir}
+%py3_install
%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/*.{py,rst}
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/__pycache__
@@ -136,25 +92,15 @@ rm -rf $RPM_BUILD_ROOT
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/testrunner-ex*/*/*/__pycache__
%{__mv} $RPM_BUILD_ROOT%{_bindir}/zope-testrunner{,-3}
-%endif
+ln -sf zope-testrunner-3 $RPM_BUILD_ROOT%{_bindir}/zope-testrunner
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES.rst COPYRIGHT.rst LICENSE.md README.rst
-%attr(755,root,root) %{_bindir}/zope-testrunner-2
-%{py_sitescriptdir}/zope/testrunner
-%{py_sitescriptdir}/zope.testrunner-%{version}-py*.egg-info
-%{py_sitescriptdir}/zope.testrunner-%{version}-py*-nspkg.pth
-%endif
-
-%if %{with python3}
-%files -n python3-zope.testrunner
-%defattr(644,root,root,755)
-%doc CHANGES.rst COPYRIGHT.rst LICENSE.md README.rst
+%attr(755,root,root) %{_bindir}/zope-testrunner
%attr(755,root,root) %{_bindir}/zope-testrunner-3
%dir %{py3_sitescriptdir}/zope/testrunner
%{py3_sitescriptdir}/zope/testrunner/*.py
@@ -162,11 +108,10 @@ rm -rf $RPM_BUILD_ROOT
%{py3_sitescriptdir}/zope.testrunner-%{version}-py*.egg-info
%{py3_sitescriptdir}/zope.testrunner-%{version}-py*-nspkg.pth
-%files -n python3-zope.testrunner-examples
+%files examples
%defattr(644,root,root,755)
%dir %{py3_sitescriptdir}/zope/testrunner/tests
%{py3_sitescriptdir}/zope/testrunner/tests/testrunner-ex*
-%endif
%if %{with doc}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-zope.testrunner.git/commitdiff/5c7c2d45175a2c2ee8afe72f9366283085d97241
More information about the pld-cvs-commit
mailing list