rpm/platform-python-abi.patch
Iryna Shcherbina 412abe2ac1 Platform-python bootstrap: step 1 - build without platform_python
Changes needed for Platform Python Stack change (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack):
- Add platform-python bytecompilation patch: platform-python-bytecompile.patch
- Add platform python deps generator patch: platform-python-abi.patch
- Add a platform-python subpackage and remove system python related declarations
- Build rpm without platform_python for bytecompilation (already set in spec file)

When platform-python package is built, switch to `%bcond_without platform_python`
to build platform-python-rpm subpackage.
2017-08-15 11:09:05 +02:00

40 lines
1.5 KiB
Diff

From fef3b646f3facd26dc04cfccdc27c061cfe0ee37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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
--
2.13.3