mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) (GH-20725)
(cherry picked from commit 8f023a2f66)
Co-authored-by: Sandro Mani <manisandro@gmail.com>
This commit is contained in:
parent
298c8c895f
commit
817506432d
11 changed files with 83 additions and 25 deletions
|
|
@ -548,6 +548,13 @@ static int test_init_from_config(void)
|
|||
/* FIXME: test home */
|
||||
/* FIXME: test path config: module_search_path .. dll_path */
|
||||
|
||||
putenv("PYTHONPLATLIBDIR=env_platlibdir");
|
||||
status = PyConfig_SetBytesString(&config, &config.platlibdir, "my_platlibdir");
|
||||
if (PyStatus_Exception(status)) {
|
||||
PyConfig_Clear(&config);
|
||||
Py_ExitStatusException(status);
|
||||
}
|
||||
|
||||
putenv("PYTHONVERBOSE=0");
|
||||
Py_VerboseFlag = 0;
|
||||
config.verbose = 1;
|
||||
|
|
@ -668,6 +675,7 @@ static void set_most_env_vars(void)
|
|||
putenv("PYTHONFAULTHANDLER=1");
|
||||
putenv("PYTHONIOENCODING=iso8859-1:replace");
|
||||
putenv("PYTHONOLDPARSER=1");
|
||||
putenv("PYTHONPLATLIBDIR=env_platlibdir");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue