[packages/python3-pkginfo] - python-pkginfo.spec updated to 1.12.1.2 for python 3.8+

qboosh qboosh at pld-linux.org
Thu Dec 4 06:28:12 CET 2025


commit 38411a2d10f20e5e6ae3198beb92e5abe01c4045
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 4 06:28:20 2025 +0100

    - python-pkginfo.spec updated to 1.12.1.2 for python 3.8+

 python-pkginfo.spec => python3-pkginfo.spec | 90 +++++------------------------
 1 file changed, 13 insertions(+), 77 deletions(-)
---
diff --git a/python-pkginfo.spec b/python3-pkginfo.spec
similarity index 51%
rename from python-pkginfo.spec
rename to python3-pkginfo.spec
index d474fad..0187d8f 100644
--- a/python-pkginfo.spec
+++ b/python3-pkginfo.spec
@@ -2,41 +2,29 @@
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_with	python3 # CPython 3.x module (built from python3-pkginfo.spec)
 
 Summary:	Query metadata from sdists/bdists/installed packages
 Summary(pl.UTF-8):	Odpytywanie medatanych z sdist/bdist/pakietów zainstalowanych
-Name:		python-pkginfo
-# keep 1.8.x here for python2 support
-Version:	1.8.3
+Name:		python3-pkginfo
+Version:	1.12.1.2
 Release:	1
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/pkginfo/
 Source0:	https://files.pythonhosted.org/packages/source/p/pkginfo/pkginfo-%{version}.tar.gz
-# Source0-md5:	e67d8f6e37ca37b5512384655bbce760
+# Source0-md5:	021f56d78ec93965b21e98bc3a3ab370
 URL:		https://pypi.org/project/pkginfo/
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-nose
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.6
+BuildRequires:	python3-modules >= 1:3.8
 BuildRequires:	python3-setuptools
 %if %{with tests}
-BuildRequires:	python3-pynose
-%endif
+BuildRequires:	python3-pytest
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with doc}
-BuildRequires:	sphinx-pdg-2
+BuildRequires:	sphinx-pdg-3
 %endif
-Requires:	python-modules >= 1:2.7
+Requires:	python3-modules >= 1:3.8
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -56,28 +44,6 @@ lub dystrybucji binarnej (tj. utworzonej przez uruchomienie
 dystrybucji oraz *.egg-info zapisane w deweloperskim zrzucie
 (utworzonym np. przez uruchomienie "setup.py develop").
 
-%package -n python3-pkginfo
-Summary:	Query metadata from sdists/bdists/installed packages
-Summary(pl.UTF-8):	Odpytywanie medatanych z sdist/bdist/pakietów zainstalowanych
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.6
-
-%description -n python3-pkginfo
-This package provides an API for querying the distutils metadata
-written in the PKG-INFO file inside a source distriubtion (an "sdist")
-or a binary distribution (e.g., created by running "bdist_egg"). It
-can also query the EGG-INFO directory of an installed distribution,
-and the *.egg-info stored in a "development checkout" (e.g, created by
-running "setup.py develop").
-
-%description -n python3-pkginfo -l pl.UTF-8
-Ten pakiet dostarcza API do odpytywania metadanych distutils,
-zapisanych w pliku PKG-INFO wewnątrz dystrybucji źródłowej ("sdist")
-lub dystrybucji binarnej (tj. utworzonej przez uruchomienie
-"bdist_egg"). Potrafi także odpytywać katalog EGG-INFO zainstalowanej
-dystrybucji oraz *.egg-info zapisane w deweloperskim zrzucie
-(utworzonym np. przez uruchomienie "setup.py develop").
-
 %package apidocs
 Summary:	API documentation for Python pkginfo module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona pkginfo
@@ -93,69 +59,39 @@ Dokumentacja API modułu Pythona pkginfo.
 %setup -q -n pkginfo-%{version}
 
 %build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTHONPATH=$(pwd) \
-nosetests-%{py_ver} pkginfo
-%endif
-%endif
-
-%if %{with python3}
 %py3_build
 
 %if %{with tests}
-# test_ctor_w_dist_info fails with metadata versions > 2.1 from newer pythons
-PYTHONPATH=$(pwd) \
-nosetests-%{py3_ver} pkginfo -e test_ctor_w_dist_info
-%endif
+# test_installed_ctor_w_dist_info doesn't support metadata >2.3 from recent pythons
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest pkginfo -k 'not test_installed_ctor_w_dist_info'
 %endif
 
 %if %{with doc}
 %{__make} -C docs html \
-	SPHINXBUILD=sphinx-build-2
+	SPHINXBUILD=sphinx-build-3
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/pkginfo{,-2}
-%endif
-
-%if %{with python3}
 %py3_install
 
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pkginfo{,-3}
 ln -s pkginfo-3 $RPM_BUILD_ROOT%{_bindir}/pkginfo
-%endif
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pkginfo/tests
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc CHANGES.txt LICENSE.txt README.txt TODO.txt
-%attr(755,root,root) %{_bindir}/pkginfo-2
-%{py_sitescriptdir}/pkginfo
-%{py_sitescriptdir}/pkginfo-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pkginfo
-%defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.txt TODO.txt
 %attr(755,root,root) %{_bindir}/pkginfo-3
 %{_bindir}/pkginfo
 %{py3_sitescriptdir}/pkginfo
 %{py3_sitescriptdir}/pkginfo-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pkginfo.git/commitdiff/38411a2d10f20e5e6ae3198beb92e5abe01c4045




More information about the pld-cvs-commit mailing list