From fa163bbd4be35db02e47b406762e74e9a3f30bfe Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 26 Nov 2022 10:11:57 +0000 Subject: [PATCH] Auto sync2gitlab import of python-rpm-generators-5-8.el8.src.rpm --- python-rpm-generators.spec | 6 +++++- pythondeps.sh | 4 ++-- pythondistdeps.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index e5c52d6..35846ef 100644 --- a/python-rpm-generators.spec +++ b/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 diff --git a/pythondeps.sh b/pythondeps.sh index 10a060a..8884f4e 100755 --- a/pythondeps.sh +++ b/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/pythondistdeps.py b/pythondistdeps.py index 176fe21..01f35b3 100755 --- a/pythondistdeps.py +++ b/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: