summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-06-29 21:28:59 (GMT)
committerGitHub <noreply@github.com>2019-06-29 21:28:59 (GMT)
commit323e743d4879f1cd861d0b252775797fb7938755 (patch)
treecfaccee98a1695fabc022c04450b972e4f79071d /Python/sysmodule.c
parent0cba121029bae0a891b02c493cb77633620701be (diff)
downloadcpython-323e743d4879f1cd861d0b252775797fb7938755.zip
cpython-323e743d4879f1cd861d0b252775797fb7938755.tar.gz
cpython-323e743d4879f1cd861d0b252775797fb7938755.tar.bz2
bpo-37369: Fix initialization of sys members when launched via an app container (GH-14467)
sys._base_executable is now always defined on all platforms, and can be overridden through configuration. Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index fbccea3..6a49d89 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -2879,6 +2879,7 @@ _PySys_InitMain(_PyRuntimeState *runtime, PyInterpreterState *interp)
COPY_LIST("path", config->module_search_paths);
SET_SYS_FROM_WSTR("executable", config->executable);
+ SET_SYS_FROM_WSTR("_base_executable", config->base_executable);
SET_SYS_FROM_WSTR("prefix", config->prefix);
SET_SYS_FROM_WSTR("base_prefix", config->base_prefix);
SET_SYS_FROM_WSTR("exec_prefix", config->exec_prefix);