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
This commit is contained in:
Steve Dower 2019-06-29 14:28:59 -07:00 committed by GitHub
parent 0cba121029
commit 323e743d48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 411 additions and 278 deletions

View file

@ -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);