diff options
author | Steve Dower <steve.dower@microsoft.com> | 2019-02-04 07:19:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-04 07:19:38 (GMT) |
commit | a8474d025cab794257d2fd0bea67840779b9351f (patch) | |
tree | 1e2521303b70f42bd63cf1f432513db9cfd04742 /Lib/venv | |
parent | 2f6fae6e510dba653391cb510a2aca8322eec03b (diff) | |
download | cpython-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/venv')
-rw-r--r-- | Lib/venv/__init__.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 8f9e313..d5ab389 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -106,10 +106,7 @@ class EnvBuilder: context.prompt = '(%s) ' % prompt create_if_needed(env_dir) env = os.environ - if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env: - executable = os.environ['__PYVENV_LAUNCHER__'] - else: - executable = sys.executable + executable = getattr(sys, '_base_executable', sys.executable) dirname, exename = os.path.split(os.path.abspath(executable)) context.executable = executable context.python_dir = dirname |