bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253)

This commit is contained in:
Vinay Sajip 2018-07-20 17:07:38 +01:00 committed by GitHub
parent cb5f3fdb9d
commit 94487d4570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -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)]