[packages/python3-zope.interface] - python-zope.interface.spec updated to 7.2 for python 3.8+

qboosh qboosh at pld-linux.org
Wed Apr 16 22:07:32 CEST 2025


commit 31f702db24539b6dea003f3a6d9a25b1abf96926
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Apr 16 22:03:14 2025 +0200

    - python-zope.interface.spec updated to 7.2 for python 3.8+

 ...e.interface.spec => python3-zope.interface.spec | 82 ++++------------------
 1 file changed, 15 insertions(+), 67 deletions(-)
---
diff --git a/python-zope.interface.spec b/python3-zope.interface.spec
similarity index 57%
rename from python-zope.interface.spec
rename to python3-zope.interface.spec
index f79f4a1..732ebeb 100644
--- a/python-zope.interface.spec
+++ b/python3-zope.interface.spec
@@ -1,51 +1,38 @@
 #
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-%bcond_without	tests	# unit tests
+%bcond_with	tests	# unit tests (fail with package already installed?)
 
 %define		module	zope.interface
 Summary:	Python 'interface' concept implementation
 Summary(pl.UTF-8):	Implementacja interfejsów dla języka Python
-Name:		python-%{module}
-# keep 5.x here for python2 support
-Version:	5.5.2
-Release:	3
+Name:		python3-%{module}
+Version:	7.2
+Release:	1
 License:	ZPL v2.1
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/zope.interface/
 Source0:	https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
-# Source0-md5:	5a383d71156ce6f89f59a86d957a8d65
+# Source0-md5:	583dac724d227b3ee2d4d4a940425961
 URL:		https://zopeinterface.readthedocs.io/
-%if %{with python2}
-BuildRequires:	python >= 1:2.7
-BuildRequires:	python-devel >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-coverage >= 5.0.3
-BuildRequires:	python-zope.event
-BuildRequires:	python-zope.testing
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3 >= 1:3.5
-BuildRequires:	python3-devel >= 1:3.5
+BuildRequires:	python3 >= 1:3.8
+BuildRequires:	python3-devel >= 1:3.8
 BuildRequires:	python3-setuptools
 %if %{with tests}
 BuildRequires:	python3-coverage >= 5.0.3
 BuildRequires:	python3-zope.event
 BuildRequires:	python3-zope.testing
 %endif
-%endif
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with doc}
+BuildRequires:	python3-furo
 BuildRequires:	python3-repoze.sphinx.autointerface
 BuildRequires:	sphinx-pdg-3
 %endif
-Requires:	python-modules >= 1:2.7
-Requires:	python-zope-base
+Requires:	python3-modules >= 1:3.8
+Requires:	python3-zope-base
 Provides:	ZopeInterface
 Provides:	Zope-Interface
 Obsoletes:	ZopeInterface < 3.4.0
@@ -59,20 +46,6 @@ Python 'interface' concept implementation.
 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
 języka Python.
 
-%package -n python3-%{module}
-Summary:	Python 'interface' concept implementation
-Summary(pl.UTF-8):	Implementacja interfejsów dla języka Python
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.5
-Requires:	python3-zope-base
-
-%description -n python3-%{module}
-Python 'interface' concept implementation.
-
-%description -n python3-%{module} -l pl.UTF-8
-Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
-języka Python.
-
 %package apidocs
 Summary:	API documentation for Python zope.interface module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona zope.interface
@@ -89,12 +62,11 @@ Dokumentacja API modułu Pythona zope.interface.
 %setup -q -n %{module}-%{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 unittest discover -s src
 %endif
 
 %if %{with doc}
@@ -105,40 +77,17 @@ PYTHONPATH=$(pwd)/src \
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
-
-%py_postclean
-%endif
 
-%if %{with python3}
 %py3_install
 
 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/interface/*.c
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc CHANGES.rst COPYRIGHT.txt README.rst
-%dir %{py_sitedir}/zope/interface
-%{py_sitedir}/zope/interface/*.py[co]
-%attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
-%{py_sitedir}/zope/interface/common
-%{py_sitedir}/zope/interface/tests
-%{py_sitedir}/zope.interface-%{version}-py*.egg-info
-%{py_sitedir}/zope.interface-%{version}-py*-nspkg.pth
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES.rst COPYRIGHT.txt README.rst
 %dir %{py3_sitedir}/zope/interface
 %{py3_sitedir}/zope/interface/*.py
 %{py3_sitedir}/zope/interface/__pycache__
@@ -147,7 +96,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitedir}/zope/interface/tests
 %{py3_sitedir}/zope.interface-%{version}-py*.egg-info
 %{py3_sitedir}/zope.interface-%{version}-py*-nspkg.pth
-%endif
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-zope.interface.git/commitdiff/31f702db24539b6dea003f3a6d9a25b1abf96926



More information about the pld-cvs-commit mailing list