diff options
author | Victor Stinner <vstinner@python.org> | 2020-06-08 17:36:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 17:36:13 (GMT) |
commit | 817506432dd1908cd154500ef18dc276b8dd7071 (patch) | |
tree | a52e893c973a14557ff2078b074b184d4b6f418a /Python/sysmodule.c | |
parent | 298c8c895f0d4fdd23a16f959efac83039fa1d19 (diff) | |
download | cpython-817506432dd1908cd154500ef18dc276b8dd7071.zip cpython-817506432dd1908cd154500ef18dc276b8dd7071.tar.gz cpython-817506432dd1908cd154500ef18dc276b8dd7071.tar.bz2 |
bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var (GH-20605) (GH-20725)
(cherry picked from commit 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae)
Co-authored-by: Sandro Mani <manisandro@gmail.com>
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 e3fe143..3e4115f 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); |