From 7ffdd8f72c0e6730ce2c386b2ac6454044fe3cea Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 16 May 2023 06:07:50 +0000 Subject: [PATCH] import python-rpm-generators-5-8.el8 --- SOURCES/pythondeps.sh | 4 ++-- SOURCES/pythondistdeps.py | 2 +- SPECS/python-rpm-generators.spec | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SOURCES/pythondeps.sh b/SOURCES/pythondeps.sh index 10a060a..8884f4e 100755 --- a/SOURCES/pythondeps.sh +++ b/SOURCES/pythondeps.sh @@ -23,8 +23,8 @@ case $1 in # /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ # generating (uniqely) lines of the form: # python(abi) = MAJOR.MINOR - grep "/usr/lib[^/]*/python.\../.*" \ - | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \ + grep -E "/usr/lib[^/]*/python[[:digit:]]+\.[[:digit:]]+/.*" \ + | sed -Ee "s|.*/usr/lib[^/]*/python([[:digit:]]+\.[[:digit:]]+)/.*|python(abi) = \1|g" \ | sort | uniq ;; esac diff --git a/SOURCES/pythondistdeps.py b/SOURCES/pythondistdeps.py index 176fe21..01f35b3 100755 --- a/SOURCES/pythondistdeps.py +++ b/SOURCES/pythondistdeps.py @@ -125,7 +125,7 @@ for f in files: # Try to parse the Python version from the path the metadata # resides at (e.g. /usr/lib/pythonX.Y/site-packages/...) import re - res = re.search(r"/python(?P\d+\.\d)/", path_item) + res = re.search(r"/python(?P\d+\.\d+)/", path_item) if res: dist.py_version = res.group('pyver') else: diff --git a/SPECS/python-rpm-generators.spec b/SPECS/python-rpm-generators.spec index e5c52d6..35846ef 100644 --- a/SPECS/python-rpm-generators.spec +++ b/SPECS/python-rpm-generators.spec @@ -5,7 +5,7 @@ Name: python-rpm-generators Summary: Dependency generators for Python RPMs Version: 5 -Release: 7%{?dist} +Release: 8%{?dist} # Originally all those files were part of RPM, so license is kept here License: GPLv2+ @@ -53,6 +53,10 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondeps.sh pythondistdeps.py %{_rpmconfigdir}/pythondistdeps.py %changelog +* Mon Nov 14 2022 Charalampos Stratakis - 5-8 +- Fix the pythondeps.sh and pythondistdeps.py scripts for multiple digits python versions +- Resolves: rhbz#2143990 + * Tue Jun 15 2021 Tomas Orsava - 5-7 - Do not parse nested dist/egg-info metadata - Resolves: rhbz#1916172