teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame platform-python-distdeps.patch

Miro Hrončok d25199
From eb48f08dd30324f960b8e404b80eb885b2bbb593 Mon Sep 17 00:00:00 2001
Miro Hrončok d25199
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Miro Hrončok d25199
Date: Thu, 24 Aug 2017 13:45:49 +0200
Miro Hrončok d25199
Subject: [PATCH] Do not provide pythonXdist for platform-python packages
Miro Hrončok d25199
Miro Hrončok d25199
---
Miro Hrončok d25199
 scripts/pythondistdeps.py | 5 ++++-
Miro Hrončok d25199
 1 file changed, 4 insertions(+), 1 deletion(-)
Miro Hrončok d25199
Miro Hrončok d25199
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
Miro Hrončok d25199
index 2abb59f49..f624fdbb7 100755
Miro Hrončok d25199
--- a/scripts/pythondistdeps.py
Miro Hrončok d25199
+++ b/scripts/pythondistdeps.py
Miro Hrončok d25199
@@ -16,6 +16,7 @@ from os.path import basename, dirname, isdir, sep
Miro Hrončok d25199
 from sys import argv, stdin, version
Miro Hrončok d25199
 from distutils.sysconfig import get_python_lib
Miro Hrončok d25199
 from warnings import warn
Miro Hrončok d25199
+import re
Miro Hrončok d25199
 
Miro Hrončok d25199
 
Miro Hrončok d25199
 opts, args = getopt(
Miro Hrončok d25199
@@ -78,6 +79,9 @@ for f in files:
Miro Hrončok d25199
     f = f.strip()
Miro Hrončok d25199
     lower = f.lower()
Miro Hrončok d25199
     name = 'python(abi)'
Miro Hrončok d25199
+    if re.search(r'/usr/lib(64)?/platform-python\d\.\d', lower):
Miro Hrončok d25199
+        # https://bugzilla.redhat.com/show_bug.cgi?id=1484607
Miro Hrončok d25199
+        continue
Miro Hrončok d25199
     # add dependency based on path, versioned if within versioned python directory
Miro Hrončok d25199
     if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')):
Miro Hrončok d25199
         if name not in py_deps:
Miro Hrončok d25199
@@ -115,7 +119,6 @@ for f in files:
Miro Hrončok d25199
         if not dist.py_version:
Miro Hrončok d25199
             # Try to parse the Python version from the path the metadata
Miro Hrončok d25199
             # resides at (e.g. /usr/lib/pythonX.Y/site-packages/...)
Miro Hrončok d25199
-            import re
Miro Hrončok d25199
             res = re.search(r"/python(?P<pyver>\d+\.\d)/", path_item)
Miro Hrončok d25199
             if res:
Miro Hrončok d25199
                 dist.py_version = res.group('pyver')
Miro Hrončok d25199
-- 
Miro Hrončok d25199
2.13.5
Miro Hrončok d25199