]> granicus.if.org Git - python/commitdiff
Issue #18807: If copying (no symlinks) specified for a venv, then the python interpre...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 28 May 2014 07:06:24 +0000 (08:06 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 28 May 2014 07:06:24 +0000 (08:06 +0100)
Lib/venv/__init__.py
Misc/NEWS

index 20dafc0353fdc0a5a7107c5e2ec0e15d73b02a7c..252bffbd7be1d80b1007937d6a20d7036d268f78 100644 (file)
@@ -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
index 13ff667f1b763440daab24611e569f548d496aaf..43a4a0c2911998f210501a8254a6ca270b08d9a4 100644 (file)
--- 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.