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
This commit is contained in:
Miro Hrončok 2018-07-28 22:15:16 +02:00
parent fdad4ede04
commit 1879d8a0e2
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@
Name: python-rpm-generators Name: python-rpm-generators
Summary: Dependency generators for Python RPMs Summary: Dependency generators for Python RPMs
Version: 5 Version: 5
Release: 3%{?dist} Release: 4%{?dist}
# Originally all those files were part of RPM, so license is kept here # Originally all those files were part of RPM, so license is kept here
License: GPLv2+ License: GPLv2+
@ -49,6 +49,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondeps.sh pythondistdeps.py
%{_rpmconfigdir}/pythondistdeps.py %{_rpmconfigdir}/pythondistdeps.py
%changelog %changelog
* Sat Jul 28 2018 Miro Hrončok <mhroncok@redhat.com> - 5-4
- Use nonstandardlib for purelib definition (#1609492)
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5-3 * Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5-3
- Add pythondist generator - Add pythondist generator

View File

@ -82,8 +82,8 @@ for f in files:
if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')): if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')):
if name not in py_deps: if name not in py_deps:
py_deps[name] = [] py_deps[name] = []
purelib = get_python_lib(standard_lib=1, plat_specific=0).split(version[:3])[0] purelib = get_python_lib(standard_lib=0, plat_specific=0).split(version[:3])[0]
platlib = get_python_lib(standard_lib=1, plat_specific=1).split(version[:3])[0] platlib = get_python_lib(standard_lib=0, plat_specific=1).split(version[:3])[0]
for lib in (purelib, platlib): for lib in (purelib, platlib):
if lib in f: if lib in f:
spec = ('==', f.split(lib)[1].split(sep)[0]) spec = ('==', f.split(lib)[1].split(sep)[0])