[New-bugs-announce] [issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home
Tzu-ping Chung
report at bugs.python.org
Sat Aug 28 02:43:22 EDT 2021
New submission from Tzu-ping Chung <uranusjr at gmail.com>:
This is similar to bpo-44860, but in the other direction:
$ docker run -it --rm -h=p fedora:34 bash
...
[root at p /]# yum install python3 -y
...
[root at p /]# type python3
python3 is hashed (/usr/bin/python3)
[root at p /]# python3 -V
Python 3.9.6
[root at 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 <report at bugs.python.org>
<https://bugs.python.org/issue45035>
_______________________________________
More information about the New-bugs-announce
mailing list