summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/spawn.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2019-02-04 07:19:38 (GMT)
committerGitHub <noreply@github.com>2019-02-04 07:19:38 (GMT)
commita8474d025cab794257d2fd0bea67840779b9351f (patch)
tree1e2521303b70f42bd63cf1f432513db9cfd04742 /Lib/multiprocessing/spawn.py
parent2f6fae6e510dba653391cb510a2aca8322eec03b (diff)
downloadcpython-a8474d025cab794257d2fd0bea67840779b9351f.zip
cpython-a8474d025cab794257d2fd0bea67840779b9351f.tar.gz
cpython-a8474d025cab794257d2fd0bea67840779b9351f.tar.bz2
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use. Make the same changes for macOS to avoid extra platform checks.
Diffstat (limited to 'Lib/multiprocessing/spawn.py')
-rw-r--r--Lib/multiprocessing/spawn.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py
index 860fa4c..6759351 100644
--- a/Lib/multiprocessing/spawn.py
+++ b/Lib/multiprocessing/spawn.py
@@ -29,19 +29,12 @@ __all__ = ['_main', 'freeze_support', 'set_executable', 'get_executable',
if sys.platform != 'win32':
WINEXE = False
WINSERVICE = False
- _WINENV = False
else:
WINEXE = getattr(sys, 'frozen', False)
WINSERVICE = sys.executable.lower().endswith("pythonservice.exe")
- _WINENV = '__PYVENV_LAUNCHER__' in os.environ
if WINSERVICE:
_python_exe = os.path.join(sys.exec_prefix, 'python.exe')
-elif _WINENV:
- # bpo-35797: When running in a venv, we need to bypass the redirect
- # executor and launch our base Python.
- import _winapi
- _python_exe = _winapi.GetModuleFileName(0)
else:
_python_exe = sys.executable