Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94487d4

Browse files
authored
bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253)
1 parent cb5f3fd commit 94487d4

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lib/venv/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import shutil
1010
import subprocess
1111
import sys
12+
import sysconfig
1213
import types
1314

1415
logger = logging.getLogger(__name__)
@@ -207,7 +208,10 @@ def setup_python(self, context):
207208
copier(context.env_exe, path, relative_symlinks_ok=True)
208209
if not os.path.islink(path):
209210
os.chmod(path, 0o755)
210-
else:
211+
elif sysconfig.is_python_build(True):
212+
# See bpo-34011. This copying code should only be needed when a
213+
# venv is created from a source Python build (i.e. not an installed
214+
# Python)
211215
subdir = 'DLLs'
212216
include = self.include_binary
213217
files = [f for f in os.listdir(dirname) if include(f)]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
A suite of code has been changed which copied across DLLs and init.tcl from
2+
the running Python location into a venv being created. These copies are needed
3+
only when running from a Python source build, and the copying code is now only
4+
run when that is the case, rather than whenever a venv is created.

0 commit comments

Comments
 (0)