From ea8d0d41e8e84b273c41e2c870ecc818e0b6ee7e Mon Sep 17 00:00:00 2001 From: Iryna Shcherbina Date: Mon, 14 Aug 2017 15:39:58 +0200 Subject: [PATCH] Generate requires and provides for platform-python(abi) --- python-rpm-generators.spec | 7 +++- ....13.x-pythondeps-platform-python-abi.patch | 36 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 rpm-4.13.x-pythondeps-platform-python-abi.patch diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index 962d7fd..42501cd 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -34,7 +34,7 @@ Name: python-rpm-generators Summary: Requires and Provides generators for Python RPMs Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}2%{?dist}.1 +Release: %{?snapver:0.%{snapver}.}3%{?dist} License: GPLv2+ Url: http://www.rpm.org/ Source0: http://ftp.rpm.org/releases/%{srcdir}/%{srcname}-%{srcver}.tar.bz2 @@ -57,6 +57,7 @@ Patch7: rpm-4.13.x-pythondistdeps.py-fix-processing-wheels.patch # Switch the shebang of pythondistdeps.py to Python 3 # Downstream only: https://github.com/rpm-software-management/rpm/pull/212 Patch8: rpm-4.13.x-pythondistdeps-python3.patch +Patch9: rpm-4.13.x-pythondeps-platform-python-abi.patch %description This package provides scripts that analyse Python binary RPM packages @@ -113,6 +114,10 @@ install -Dm 755 scripts/__pycache__/* \ %changelog +* Tue Aug 08 2017 Tomas Orsava - 4.13.0.1-3 +- Add patch 9: Generate requires and provides for platform-python(abi) + (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack) + * Thu Jul 27 2017 Fedora Release Engineering - 4.13.0.1-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild diff --git a/rpm-4.13.x-pythondeps-platform-python-abi.patch b/rpm-4.13.x-pythondeps-platform-python-abi.patch new file mode 100644 index 0000000..b44e900 --- /dev/null +++ b/rpm-4.13.x-pythondeps-platform-python-abi.patch @@ -0,0 +1,36 @@ +From fef3b646f3facd26dc04cfccdc27c061cfe0ee37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 7 Aug 2017 16:28:59 +0200 +Subject: [PATCH] Generate requires and provides for platform-python(abi) + +See https://fedoraproject.org/wiki/Changes/Platform_Python_Stack +--- + scripts/pythondeps.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/scripts/pythondeps.sh b/scripts/pythondeps.sh +index 10a060aac..a6d97ef4f 100755 +--- a/scripts/pythondeps.sh ++++ b/scripts/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|" ++ egrep '/usr/(bin/|libexec/platform-)python.\..$' \ ++ | sed -r -e "s@.*/usr/(bin/|libexec/(platform-))python(.\..)@\2python(abi) = \3@" + ;; + -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" \ ++ egrep '/usr/lib[^/]*/(platform-|)python.\../.*' \ ++ | sed -r -e "s@.*/usr/lib[^/]*/(platform-|)python(.\..)/.*@\1python(abi) = \2@g" \ + | sort | uniq + ;; + esac