diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2018-07-20 16:07:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 16:07:38 (GMT) |
commit | 94487d45707772723ef19e86700a40a12743baa1 (patch) | |
tree | 47f72c11e34128b52d0eaebf65231b87bb9effca /Lib/venv | |
parent | cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1 (diff) | |
download | cpython-94487d45707772723ef19e86700a40a12743baa1.zip cpython-94487d45707772723ef19e86700a40a12743baa1.tar.gz cpython-94487d45707772723ef19e86700a40a12743baa1.tar.bz2 |
bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253)
Diffstat (limited to 'Lib/venv')
-rw-r--r-- | Lib/venv/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 716129d..e0ab241 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -9,6 +9,7 @@ import os import shutil import subprocess import sys +import sysconfig import types logger = logging.getLogger(__name__) @@ -207,7 +208,10 @@ class EnvBuilder: copier(context.env_exe, path, relative_symlinks_ok=True) if not os.path.islink(path): os.chmod(path, 0o755) - else: + elif sysconfig.is_python_build(True): + # See bpo-34011. This copying code should only be needed when a + # venv is created from a source Python build (i.e. not an installed + # Python) subdir = 'DLLs' include = self.include_binary files = [f for f in os.listdir(dirname) if include(f)] |