diff options
author | Sandro Mani <manisandro@gmail.com> | 2020-06-08 17:28:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 17:28:11 +0200 |
commit | 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae (patch) | |
tree | 8aa9027476167eca69c0e17ba8712f624bdb8e15 /Python/sysmodule.c | |
parent | c6b292cdeee689f0bfac6c1e2c2d4e4e01fa8d9e (diff) | |
download | cpython-8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae.tar.gz cpython-8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae.zip |
bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index e3fe1436145..3e4115fe8e1 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2922,13 +2922,7 @@ _PySys_InitMain(PyThreadState *tstate) SET_SYS_FROM_WSTR("base_prefix", config->base_prefix); SET_SYS_FROM_WSTR("exec_prefix", config->exec_prefix); SET_SYS_FROM_WSTR("base_exec_prefix", config->base_exec_prefix); - { - PyObject *str = PyUnicode_FromString(PLATLIBDIR); - if (str == NULL) { - return -1; - } - SET_SYS_FROM_STRING("platlibdir", str); - } + SET_SYS_FROM_WSTR("platlibdir", config->platlibdir); if (config->pycache_prefix != NULL) { SET_SYS_FROM_WSTR("pycache_prefix", config->pycache_prefix); |