summaryrefslogtreecommitdiffstats
path: root/Lib/venv
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-07-08 16:50:42 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-07-08 16:50:42 (GMT)
commit4d378d834971179acf14c3ba019f64eafa9b6473 (patch)
treec0ff2d4d0c6997f672ed8889b22edc7027e76874 /Lib/venv
parent07c4e33c0776ee757b4ac24f4426cab5418c414e (diff)
downloadcpython-4d378d834971179acf14c3ba019f64eafa9b6473.zip
cpython-4d378d834971179acf14c3ba019f64eafa9b6473.tar.gz
cpython-4d378d834971179acf14c3ba019f64eafa9b6473.tar.bz2
Closes #15281, #15283: Don't make venv scripts executable, but copy source mode instead, and provide better help for pyvenv.
Diffstat (limited to 'Lib/venv')
-rw-r--r--Lib/venv/__init__.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 3d9d3b7..38ed54c 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -316,7 +316,7 @@ class EnvBuilder:
data = self.replace_variables(data, context)
with open(dstfile, mode) as f:
f.write(data)
- os.chmod(dstfile, 0o755)
+ shutil.copymode(srcfile, dstfile)
def create(env_dir, system_site_packages=False, clear=False, symlinks=False):
@@ -354,7 +354,12 @@ def main(args=None):
description='Creates virtual Python '
'environments in one or '
'more target '
- 'directories.')
+ 'directories.',
+ epilog='Once an environment has been '
+ 'created, you may wish to '
+ 'activate it, e.g. by '
+ 'sourcing an activate script '
+ 'in its bin directory.')
parser.add_argument('dirs', metavar='ENV_DIR', nargs='+',
help='A directory to create the environment in.')
parser.add_argument('--system-site-packages', default=False,
@@ -368,7 +373,9 @@ def main(args=None):
use_symlinks = True
parser.add_argument('--symlinks', default=use_symlinks,
action='store_true', dest='symlinks',
- help="Attempt to symlink rather than copy.")
+ help='Try to use symlinks rather than copies, '
+ 'when symlinks are not the default for '
+ 'the platform.')
parser.add_argument('--clear', default=False, action='store_true',
dest='clear', help='Delete the environment '
'directory if it already '