Skip to content

bpo-34032: Add platlibdir as an option for distinguishing /usr/lib and /usr/lib64 #8068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

mcepl
Copy link
Contributor

@mcepl mcepl commented Jul 3, 2018

Build system has been modified to allow /usr/lib64 as well as /usr/lib into install path as well as to the search path for the Linux distributions which distinguish between 32bit and 64bit libraries.

https://bugs.python.org/issue34032

@vstinner , @doko42 , who else?

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new "platlibdir" variable should be documented in Doc/library/sysconfig.rst:
https://docs.python.org/dev/library/sysconfig.html#installation-paths

You have to add it to the list, and also add a ".. versionchanged:: 3.8 (...)" markup to document the change.

IMHO it's worth it to also add a second NEWS entry for the sysconfig change (new "platlibdir" variable).

@@ -0,0 +1,3 @@
Build system has been modified to allow /usr/lib64 as well as /usr/lib into
install path as well as to the search path for the Linux distributions which
distinguish between 32bit and 64bit libraries.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mention the new --with-custom-platlibdir= configure option somewhere?

Nitpick: I would write "32 bit and 64 bit libraries" ;-) (or "32-bit and 64-bit libraries")

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenSUSE patch only changes the "unix_prefix" scheme, but the Fedora patch also changes the 'unix_home' scheme. To be honest, I don't understand well this change.

@mcepl
Copy link
Contributor Author

mcepl commented Jul 4, 2018

Hmm, this pull request fails on AppVeyor with:

======================================================================
ERROR: test_user_site (distutils.tests.test_install.InstallTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\distutils\tests\test_install.py", line 114, in test_user_site
    cmd.ensure_finalized()
  File "C:\projects\cpython\lib\distutils\cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "C:\projects\cpython\lib\distutils\command\install.py", line 330, in finalize_options
    self.create_home_path()
  File "C:\projects\cpython\lib\distutils\command\install.py", line 536, in create_home_path
    if path.startswith(home) and not os.path.isdir(path):
AttributeError: 'NoneType' object has no attribute 'startswith'
----------------------------------------------------------------------
Ran 246 tests in 32.131s
FAILED (errors=1, skipped=24)
test test_distutils failed

and with

test_user_similar (test.test_sysconfig.TestSysConfig) ... test test_sysconfig failed
ERROR
======================================================================
ERROR: test_get_path (test.test_sysconfig.TestSysConfig)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_sysconfig.py", line 100, in test_get_path
    res = get_path(name, scheme)
  File "C:\projects\cpython\lib\sysconfig.py", line 506, in get_path
    return get_paths(scheme, vars, expand)[name]
  File "C:\projects\cpython\lib\sysconfig.py", line 496, in get_paths
    return _expand_vars(scheme, vars)
  File "C:\projects\cpython\lib\sysconfig.py", line 170, in _expand_vars
    res[key] = os.path.normpath(_subst_vars(value, vars))
  File "C:\projects\cpython\lib\sysconfig.py", line 151, in _subst_vars
    raise AttributeError('{%s}' % var) from None
AttributeError: {'installed_base'}
======================================================================
ERROR: test_user_similar (test.test_sysconfig.TestSysConfig)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_sysconfig.py", line 267, in test_user_similar
    global_path = get_path(name, 'posix_prefix')
  File "C:\projects\cpython\lib\sysconfig.py", line 506, in get_path
    return get_paths(scheme, vars, expand)[name]
  File "C:\projects\cpython\lib\sysconfig.py", line 496, in get_paths
    return _expand_vars(scheme, vars)
  File "C:\projects\cpython\lib\sysconfig.py", line 170, in _expand_vars
    res[key] = os.path.normpath(_subst_vars(value, vars))
  File "C:\projects\cpython\lib\sysconfig.py", line 151, in _subst_vars
    raise AttributeError('{%s}' % var) from None
AttributeError: {'installed_base'}
----------------------------------------------------------------------
Ran 21 tests in 0.084s

Hmm, I guess this whole thing should be limited just to Unix (non-Windows, non-Mac) systems, right?

Jan Matejek and others added 2 commits May 24, 2019 15:23
…d /usr/lib64

Build system has been modified to allow /usr/lib64 as well as /usr/lib into
install path as well as to the search path for the Linux distributions which
distinguish between 32bit and 64bit libraries.
@Fak3
Copy link

Fak3 commented Jul 27, 2019

Was this superseded by #11755 ?

@vstinner
Copy link
Member

I merged PR #18381 instead which is very similar. Thanks @mcepl for helping on PR #18381.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants