[pypy-commit] pypy py3.6: issue 3159: venv should copy directories, not just files
mattip
pypy.commits at gmail.com
Sun Jan 26 05:13:15 EST 2020
Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r98588:39898aeb2799
Date: 2020-01-26 12:12 +0200
http://bitbucket.org/pypy/pypy/changeset/39898aeb2799/
Log: issue 3159: venv should copy directories, not just files
diff --git a/lib-python/3/venv/__init__.py b/lib-python/3/venv/__init__.py
--- a/lib-python/3/venv/__init__.py
+++ b/lib-python/3/venv/__init__.py
@@ -196,7 +196,10 @@
logger.warning('Unable to symlink %r to %r', src, dst)
force_copy = True
if force_copy:
- shutil.copyfile(src, dst)
+ if os.path.isdir(src):
+ shutil.copytree(src, dst)
+ else:
+ shutil.copyfile(src, dst)
def setup_python(self, context):
"""
More information about the pypy-commit
mailing list