homepage

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 eric.snow
Recipients eric.snow
Date 2021年09月15日.17:19:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631726385.76.0.396419410784.issue45211@roundup.psfhosted.org>
In-reply-to
Content
Currently we calculate a number of filesystem paths during runtime initialization in Modules/getpath.c (with the key goal of producing what will end up in sys.path). Some of those paths are preserved and some are not. In cases where the discarded data comes from filesystem access, we should preserve as much as possible.
The most notable info is location of the stdlib source files. We would store this as PyConfig.stdlib_dir (and _PyPathConfig.stdlib_dir). We'd expose it with sys.stdlibdir (or sys.get_stdlib_dir() if we might need to calculate lazily), similar to sys.platlibdir, sys.home, and sys.prefix.
sys.stdlibdir would allow us to avoid filesystem access, for example:
* in site.py
* in sysconfig.py
* detect if python is running out of the source tree (needed for bpo-45020)
FYI, I have a branch that mostly does what I'm suggesting here.
History
Date User Action Args
2021年09月15日 17:19:45eric.snowsetrecipients: + eric.snow
2021年09月15日 17:19:45eric.snowsetmessageid: <1631726385.76.0.396419410784.issue45211@roundup.psfhosted.org>
2021年09月15日 17:19:45eric.snowlinkissue45211 messages
2021年09月15日 17:19:45eric.snowcreate

AltStyle によって変換されたページ (->オリジナル) /