From 1879d8a0e231b74286c8ae113c401dbbb4b04734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 28 Jul 2018 22:15:16 +0200 Subject: [PATCH] Use nonstandardlib for purelib definition (#1609492) The purelib and platlib were both defined to /usr/lib64/python on 64bits systems. This is because: >>> get_python_lib(standard_lib=1, plat_specific=0) '/usr/lib64/python3.7' >>> get_python_lib(standard_lib=1, plat_specific=1) '/usr/lib64/python3.7' >>> get_python_lib(standard_lib=0, plat_specific=0) '/usr/lib/python3.7/site-packages' >>> get_python_lib(standard_lib=0, plat_specific=1) '/usr/lib64/python3.7/site-packages' So now we use standard_lib=0 to get the site-packages base path from /usr/lib and not /usr/lib64. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1609492 --- python-rpm-generators.spec | 5 ++++- pythondistdeps.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index 4474357..352adb4 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -5,7 +5,7 @@ Name: python-rpm-generators Summary: Dependency generators for Python RPMs Version: 5 -Release: 3%{?dist} +Release: 4%{?dist} # Originally all those files were part of RPM, so license is kept here License: GPLv2+ @@ -49,6 +49,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondeps.sh pythondistdeps.py %{_rpmconfigdir}/pythondistdeps.py %changelog +* Sat Jul 28 2018 Miro HronĨok - 5-4 +- Use nonstandardlib for purelib definition (#1609492) + * Sat Jul 28 2018 Igor Gnatenko - 5-3 - Add pythondist generator diff --git a/pythondistdeps.py b/pythondistdeps.py index a15ccba..2f3dd71 100755 --- a/pythondistdeps.py +++ b/pythondistdeps.py @@ -82,8 +82,8 @@ for f in files: if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')): if name not in py_deps: py_deps[name] = [] - purelib = get_python_lib(standard_lib=1, plat_specific=0).split(version[:3])[0] - platlib = get_python_lib(standard_lib=1, plat_specific=1).split(version[:3])[0] + purelib = get_python_lib(standard_lib=0, plat_specific=0).split(version[:3])[0] + platlib = get_python_lib(standard_lib=0, plat_specific=1).split(version[:3])[0] for lib in (purelib, platlib): if lib in f: spec = ('==', f.split(lib)[1].split(sep)[0])