Skip to content

Commit 5d6e463

Browse files
authored
bpo-43749: Ensure current exe is copied when using venv on windows (pythonGH-25216)
Automerge-Triggered-By: GH:vsajip
1 parent 60d343a commit 5d6e463

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/venv/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ def setup_python(self, context):
267267
os.path.normcase(f).startswith(('python', 'vcruntime'))
268268
]
269269
else:
270-
suffixes = ['python.exe', 'python_d.exe', 'pythonw.exe',
271-
'pythonw_d.exe']
270+
suffixes = {'python.exe', 'python_d.exe', 'pythonw.exe', 'pythonw_d.exe'}
271+
base_exe = os.path.basename(context.env_exe)
272+
suffixes.add(base_exe)
272273

273274
for suffix in suffixes:
274275
src = os.path.join(dirname, suffix)

0 commit comments

Comments
 (0)