This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, akitada, andybuckley, barry, belopolsky, carlos.velasco, catalin.iacob, christian.heimes, cstratak, doko, eitan.adler, eric.araujo, hroncok, ivazquez, jafo, jcea, lemburg, matejcik, mcepl, miss-islington, petr.viktorin, pillarsdotnet, piotr.dobrogost, pitrou, tarek, vstinner
Date 2020-02-12.13:48:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581515311.81.0.904019231977.issue1294959@roundup.psfhosted.org>
In-reply-to
Content
Summary:

* This issue is mostly about pushing a 16-years old patch from Fedora and SuSE to Python upstream. Other Linux distributions use different solutions to support multiple architectures in the same filesystem. For example, Debian and Ubuntu uses "Multiarch" which continues to use /usr/lib/ for 32-bit and 64-bit x86 architecture (x86 and x86-64).

* I pushed the non controversial part of PR 3698: fix pydoc and trace modules to use sysconfig to get the stdlib path

* CI tests pass on PR 18381.

* Matthias Klose asked to not add another sys attribute, but Jan Matějek explained that the option value is needed to import the sysconfig module. Moreover, the option value is needed in the site module and we are trying to avoid "import sysconfig" in site since it would slowdown Python startup time.

* I chose "./configure --with-python-libdir" and "sys.python_libdir" names. PR 3698 uses "./configure --with-custom-platsubdir" and sysconfig.get_config_var('platsubdir') names. Other proposed names: sys.lib, os.lib_dir. It was proposed to drop "custom" from "./configure --with-custom-platsubdir" option name.

Python use many paths. The sysconfig module is a good starting point to discover them all in the _INSTALL_SCHEMES directories. PR 18381 changes the following paths:

* posix_prefix: stdlib, platstdlib, platlib
* posix_user: stdlib, platstdlib, platlib


Examples on Fedora:

* pure Python: /usr/lib64/python3.7/os.py
* C extension: /usr/lib64/python3.7/lib-dynload/_multiprocessing.cpython-37m-x86_64-linux-gnu.so

Examples on SuSE:

* pure Python: /usr/lib64/python3.7/os.py

Ubuntu 16.04:

* pure Python: /usr/lib/python3.5/os.py
* C extension: /usr/lib/python3.5/lib-dynload/_multiprocessing.cpython-35m-x86_64-linux-gnu.so
History
Date User Action Args
2020-02-12 13:48:31vstinnersetrecipients: + vstinner, lemburg, barry, doko, jafo, jcea, belopolsky, pitrou, christian.heimes, matejcik, tarek, ivazquez, mcepl, eric.araujo, Arfrever, akitada, andybuckley, petr.viktorin, catalin.iacob, piotr.dobrogost, eitan.adler, cstratak, hroncok, miss-islington, pillarsdotnet, carlos.velasco
2020-02-12 13:48:31vstinnersetmessageid: <1581515311.81.0.904019231977.issue1294959@roundup.psfhosted.org>
2020-02-12 13:48:31vstinnerlinkissue1294959 messages
2020-02-12 13:48:31vstinnercreate