From d2519961ceb2d52e8ee1f66a85d083320b2dba47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 24 Aug 2017 14:00:38 +0200 Subject: [PATCH] Add patch for consistency with python-rpm-generators --- platform-python-distdeps.patch | 42 ++++++++++++++++++++++++++++++++++ rpm.spec | 3 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 platform-python-distdeps.patch diff --git a/platform-python-distdeps.patch b/platform-python-distdeps.patch new file mode 100644 index 0000000..8afbf3b --- /dev/null +++ b/platform-python-distdeps.patch @@ -0,0 +1,42 @@ +From eb48f08dd30324f960b8e404b80eb885b2bbb593 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 24 Aug 2017 13:45:49 +0200 +Subject: [PATCH] Do not provide pythonXdist for platform-python packages + +--- + scripts/pythondistdeps.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py +index 2abb59f49..f624fdbb7 100755 +--- a/scripts/pythondistdeps.py ++++ b/scripts/pythondistdeps.py +@@ -16,6 +16,7 @@ from os.path import basename, dirname, isdir, sep + from sys import argv, stdin, version + from distutils.sysconfig import get_python_lib + from warnings import warn ++import re + + + opts, args = getopt( +@@ -78,6 +79,9 @@ for f in files: + f = f.strip() + lower = f.lower() + name = 'python(abi)' ++ if re.search(r'/usr/lib(64)?/platform-python\d\.\d', lower): ++ # https://bugzilla.redhat.com/show_bug.cgi?id=1484607 ++ continue + # add dependency based on path, versioned if within versioned python directory + if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')): + if name not in py_deps: +@@ -115,7 +119,6 @@ for f in files: + if not dist.py_version: + # 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) + if res: + dist.py_version = res.group('pyver') +-- +2.13.5 + diff --git a/rpm.spec b/rpm.spec index 5b2c571..ed53299 100644 --- a/rpm.spec +++ b/rpm.spec @@ -76,9 +76,10 @@ Patch907: rpm-4.13.90-ldflags.patch # Use platform-python for bytecompilation in /usr/lib*/platform-python Patch908: platform-python-bytecompile.patch -# This patch is currently not part of any built RPM, however, to be +# Those patches are currently not part of any built RPM, however, to be # consistent with python-rpm-generators, we are adding it anyway. Patch909: platform-python-abi.patch +Patch910: platform-python-distdeps.patch # Partially GPL/LGPL dual-licensed and some bits with BSD # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD