Iryna Shcherbina 412abe
From fef3b646f3facd26dc04cfccdc27c061cfe0ee37 Mon Sep 17 00:00:00 2001
Iryna Shcherbina 412abe
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Iryna Shcherbina 412abe
Date: Mon, 7 Aug 2017 16:28:59 +0200
Iryna Shcherbina 412abe
Subject: [PATCH] Generate requires and provides for platform-python(abi)
Iryna Shcherbina 412abe
Iryna Shcherbina 412abe
See https://fedoraproject.org/wiki/Changes/Platform_Python_Stack
Iryna Shcherbina 412abe
---
Iryna Shcherbina 412abe
 scripts/pythondeps.sh | 8 ++++----
Iryna Shcherbina 412abe
 1 file changed, 4 insertions(+), 4 deletions(-)
Iryna Shcherbina 412abe
Iryna Shcherbina 412abe
diff --git a/scripts/pythondeps.sh b/scripts/pythondeps.sh
Iryna Shcherbina 412abe
index 10a060aac..a6d97ef4f 100755
Iryna Shcherbina 412abe
--- a/scripts/pythondeps.sh
Iryna Shcherbina 412abe
+++ b/scripts/pythondeps.sh
Iryna Shcherbina 412abe
@@ -13,8 +13,8 @@ case $1 in
Iryna Shcherbina 412abe
     # generating a line of the form
Iryna Shcherbina 412abe
     #    python(abi) = MAJOR.MINOR
Iryna Shcherbina 412abe
     # (Don't match against -config tools e.g. /usr/bin/python2.6-config)
Iryna Shcherbina 412abe
-    grep "/usr/bin/python.\..$" \
Iryna Shcherbina 412abe
-        | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
Iryna Shcherbina 412abe
+    egrep '/usr/(bin/|libexec/platform-)python.\..$' \
Iryna Shcherbina 412abe
+        | sed -r -e "s@.*/usr/(bin/|libexec/(platform-))python(.\..)@\2python(abi) = \3@"
Iryna Shcherbina 412abe
     ;;
Iryna Shcherbina 412abe
 -R|--requires)
Iryna Shcherbina 412abe
     shift
Iryna Shcherbina 412abe
@@ -23,8 +23,8 @@ case $1 in
Iryna Shcherbina 412abe
     #    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
Iryna Shcherbina 412abe
     # generating (uniqely) lines of the form:
Iryna Shcherbina 412abe
     #    python(abi) = MAJOR.MINOR
Iryna Shcherbina 412abe
-    grep "/usr/lib[^/]*/python.\../.*" \
Iryna Shcherbina 412abe
-        | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
Iryna Shcherbina 412abe
+    egrep '/usr/lib[^/]*/(platform-|)python.\../.*' \
Iryna Shcherbina 412abe
+        | sed -r -e "s@.*/usr/lib[^/]*/(platform-|)python(.\..)/.*@\1python(abi) = \2@g" \
Iryna Shcherbina 412abe
         | sort | uniq
Iryna Shcherbina 412abe
     ;;
Iryna Shcherbina 412abe
 esac
Iryna Shcherbina 412abe
-- 
Iryna Shcherbina 412abe
2.13.3
Iryna Shcherbina 412abe