Skip to content
Prev Previous commit
Next Next commit
Use sys.executable to find name of venv executable
  • Loading branch information
lysnikolaou committed May 26, 2023
commit dc89e7b8c9b847498b75749e1fbbffbeba1914d6
4 changes: 1 addition & 3 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2289,9 +2289,7 @@ def setup_venv_with_pip_setuptools_wheel(venv_dir):
venv = os.path.join(temp_dir, venv_dir)

# Get the Python executable of the venv
python_exe = 'python'
if sys.executable.endswith('.exe'):
python_exe += '.exe'
python_exe = os.path.basename(sys.executable)
if sys.platform == 'win32':
python = os.path.join(venv, 'Scripts', python_exe)
else:
Expand Down