New submission from Tzu-ping Chung <[email protected]>:
This is similar to bpo-44860, but in the other direction:
$ docker run -it --rm -h=p fedora:34 bash
...
[root@p /]# yum install python3 -y
...
[root@p /]# type python3
python3 is hashed (/usr/bin/python3)
[root@p /]# python3 -V
Python 3.9.6
[root@p /]# python3.9 -q
>>> from distutils.command.install import install
>>> from distutils.dist import Distribution
>>> c = install(Distribution())
>>> c.home = '/foo'
>>> c.finalize_options()
>>> c.install_platlib
'/foo/lib64/python'
>>> import sysconfig
>>> sysconfig.get_path('platlib', 'posix_home', vars={'home': '/root'})
'/foo/lib/python'
sysconfig’s scheme should use `{platlib}` instead of hardcoding 'lib'.
Note that on Python 3.10+ the platlib values from distutils and sysconfig do
match (since the distutils scheme is automatically generated from sysconfig),
but the issue remains; sysconfig’s scheme should likely include `{platlib}`
(adding Victor and Miro to confirm this).
----------
components: Distutils, Library (Lib)
messages: 400463
nosy: dstufft, eric.araujo, hroncok, uranusjr, vstinner
priority: normal
severity: normal
status: open
title: sysconfig's posix_home scheme has different platlib value to distutils's
unix_home
versions: Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45035>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com