From 432810f9f35c014afecbd24edda6b26a3cf04fd9 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 28 May 2014 08:06:24 +0100 Subject: Issue #18807: If copying (no symlinks) specified for a venv, then the python interpreter aliases (python, python3) are now created by copying rather than symlinking. --- Lib/venv/__init__.py | 5 ++++- Misc/NEWS | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 20dafc0..252bffb 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -212,7 +212,10 @@ class EnvBuilder: for suffix in ('python', 'python3'): path = os.path.join(binpath, suffix) if not os.path.exists(path): - os.symlink(exename, path) + # Issue 18807: make copies if + # symlinks are not wanted + copier(context.env_exe, path) + os.chmod(path, 0o755) else: subdir = 'DLLs' include = self.include_binary diff --git a/Misc/NEWS b/Misc/NEWS index 13ff667..43a4a0c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -18,6 +18,10 @@ Core and Builtins Library ------- +- Issue #18807: If copying (no symlinks) specified for a venv, then the python + interpreter aliases (python, python3) are now created by copying rather than + symlinking. + - Issue #14710: pkgutil.get_loader() no longer raises an exception when None is found in sys.modules. -- cgit v0.12