mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
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:
parent
0cba121029
commit
323e743d48
17 changed files with 411 additions and 278 deletions
|
@ -22,8 +22,7 @@ WINSERVICE = sys.executable.lower().endswith("pythonservice.exe")
|
|||
def _path_eq(p1, p2):
|
||||
return p1 == p2 or os.path.normcase(p1) == os.path.normcase(p2)
|
||||
|
||||
WINENV = (hasattr(sys, '_base_executable') and
|
||||
not _path_eq(sys.executable, sys._base_executable))
|
||||
WINENV = not _path_eq(sys.executable, sys._base_executable)
|
||||
|
||||
|
||||
def _close_handles(*handles):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue