[packages/python3-zope.testing] - python-zope.testing.spec updated to 5.1 for python 3.9+
qboosh
qboosh at pld-linux.org
Mon Apr 21 08:38:44 CEST 2025
commit 3aa280d6b753bd717464e46f1307b7d8d7bd761c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Apr 21 07:21:02 2025 +0200
- python-zope.testing.spec updated to 5.1 for python 3.9+
...-zope.testing.spec => python3-zope.testing.spec | 85 +++++-----------------
1 file changed, 18 insertions(+), 67 deletions(-)
---
diff --git a/python-zope.testing.spec b/python3-zope.testing.spec
similarity index 52%
rename from python-zope.testing.spec
rename to python3-zope.testing.spec
index adcc1da..bdacefd 100644
--- a/python-zope.testing.spec
+++ b/python3-zope.testing.spec
@@ -2,38 +2,25 @@
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
%define module zope.testing
Summary: Support for different testing frameworks
Summary(pl.UTF-8): Obsługa różnych szkieletów testowych
-Name: python-%{module}
-# keep 4.x here for python2 support
-Version: 4.10
-Release: 3
+Name: python3-%{module}
+Version: 5.1
+Release: 1
License: ZPL v2.1
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/zope-testing/
-Source0: https://files.pythonhosted.org/packages/source/z/zope.testing/zope.testing-%{version}.tar.gz
-# Source0-md5: c12a0d350acc6d267f6c53a440e00049
+Source0: https://files.pythonhosted.org/packages/source/z/zope.testing/zope_testing-%{version}.tar.gz
+# Source0-md5: c431453beaca9914aa10a7dabd79c59e
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-zope.testrunner
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.5
-BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-devel >= 1:3.9
+BuildRequires: python3-modules >= 1:3.9
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-zope.testrunner
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
@@ -42,9 +29,8 @@ BuildRequires: python3-zope.exceptions
BuildRequires: python3-zope.interface
BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.7
-Requires: python-zope-base
-Obsoletes: Zope-Testing < 4
+Requires: python3-modules >= 1:3.9
+Requires: python3-zope-base
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -56,21 +42,6 @@ doctest and unittest.
Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
doctest jak i unittest.
-%package -n python3-%{module}
-Summary: Support for different testing frameworks
-Summary(pl.UTF-8): Obsługa różnych szkieletów testowych
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.5
-Requires: python3-zope-base
-
-%description -n python3-%{module}
-This package provides a number of testing frameworks. It supports both
-doctest and unittest.
-
-%description -n python3-%{module} -l pl.UTF-8
-Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
-doctest jak i unittest.
-
%package apidocs
Summary: API documentation for Python zope.testing module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.testing
@@ -83,59 +54,39 @@ API documentation for Python zope.testing module.
Dokumentacja API modułu Pythona zope.testing.
%prep
-%setup -q -n %{module}-%{version}
+%setup -q -n zope_testing-%{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 \
+zope-testrunner-3 --test-path=src
%endif
%if %{with doc}
+PYTHONPATH=$(pwd)/src \
sphinx-build-3 -b html docs docs/_build/html
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-# tests
-%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
-%endif
-
-%if %{with python3}
%py3_install
-# tests
-%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
-%endif
+# tests for zope.testing itself
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/tests.py \
+ $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/__pycache__/tests.*.py*
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
-%{py_sitescriptdir}/zope/testing
-%{py_sitescriptdir}/zope.testing-%{version}-py*.egg-info
-%{py_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%{py3_sitescriptdir}/zope/testing
%{py3_sitescriptdir}/zope.testing-%{version}-py*.egg-info
%{py3_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth
-%endif
%if %{with doc}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-zope.testing.git/commitdiff/3aa280d6b753bd717464e46f1307b7d8d7bd761c
More information about the pld-cvs-commit
mailing list