From 6d573e6889e5304ec4558640db27ceb5bf24f472 Mon Sep 17 00:00:00 2001 From: chen-huihan Date: Tue, 6 Aug 2024 15:13:26 +0800 Subject: [PATCH] fix python provide and requires (cherry picked from commit 6cdd8a8788b864bfbb39618d32a7a164248ef651) --- python-rpm-generators.spec | 5 ++++- pythondeps.sh | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index f29da37..ca3bffc 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -2,7 +2,7 @@ Name: python-rpm-generators Version: 9 -Release: 4 +Release: 5 Summary: Dependency generators for Python RPMs License: GPLv2+ @@ -44,6 +44,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondeps.sh pythondistdeps.py %{_rpmconfigdir}/pythondistdeps.py %changelog +* Tue Aug 06 2024 chenhuihan - 9-5 +- Fix python provide and requires + * Sun Apr 23 2023 caodongxia - 9-4 - Fix the python3 version cannot be found when pyproject.toml is used for building diff --git a/pythondeps.sh b/pythondeps.sh index 10a060a..8114241 100644 --- a/pythondeps.sh +++ b/pythondeps.sh @@ -13,8 +13,8 @@ case $1 in # generating a line of the form # python(abi) = MAJOR.MINOR # (Don't match against -config tools e.g. /usr/bin/python2.6-config) - grep "/usr/bin/python.\..$" \ - | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|" + grep "/usr/bin/python.\...$" \ + | sed -e "s|.*/usr/bin/python\(.\...\)|python(abi) = \1|" ;; -R|--requires) shift @@ -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 "/usr/lib[^/]*/python.\.../.*" \ + | sed -e "s|.*/usr/lib[^/]*/python\(.\...\)/.*|python(abi) = \1|g" \ | sort | uniq ;; esac -- Gitee