bpo-45211: Remember the stdlib dir during startup. (gh-28586)

During runtime startup we figure out the stdlib dir but currently throw that information away. This change preserves it and exposes it via PyConfig.stdlib_dir, _Py_GetStdlibDir(), and sys._stdlib_dir.

https://bugs.python.org/issue45211
This commit is contained in:
Eric Snow 2021-09-28 12:18:28 -06:00 committed by GitHub
parent 84975146a7
commit 0c50b8c0b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 93 additions and 3 deletions

View file

@ -122,6 +122,7 @@ PyAPI_FUNC(PyStatus) _Py_PreInitializeFromConfig(
const PyConfig *config,
const struct _PyArgv *args);
PyAPI_FUNC(wchar_t *) _Py_GetStdlibDir(void);
PyAPI_FUNC(int) _Py_HandleSystemExit(int *exitcode_p);