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

Skip to content

Commit 432810f

Browse files
committed
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.
1 parent 3207a03 commit 432810f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/venv/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ def setup_python(self, context):
212212
for suffix in ('python', 'python3'):
213213
path = os.path.join(binpath, suffix)
214214
if not os.path.exists(path):
215-
os.symlink(exename, path)
215+
# Issue 18807: make copies if
216+
# symlinks are not wanted
217+
copier(context.env_exe, path)
218+
os.chmod(path, 0o755)
216219
else:
217220
subdir = 'DLLs'
218221
include = self.include_binary

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Core and Builtins
1818
Library
1919
-------
2020

21+
- Issue #18807: If copying (no symlinks) specified for a venv, then the python
22+
interpreter aliases (python, python3) are now created by copying rather than
23+
symlinking.
24+
2125
- Issue #14710: pkgutil.get_loader() no longer raises an exception when None is
2226
found in sys.modules.
2327

0 commit comments

Comments
 (0)