diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-08-24 23:04:06 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-08-24 23:04:06 (GMT) |
commit | 59390279699f5c3c3367f914dfe954d703c62b95 (patch) | |
tree | eaba8861ad8fcae0a60942d0904f6cedb76ad873 /Lib/venv/__init__.py | |
parent | cabbde9e1ef851ec02a181fdf5b090ca534f864e (diff) | |
download | cpython-59390279699f5c3c3367f914dfe954d703c62b95.zip cpython-59390279699f5c3c3367f914dfe954d703c62b95.tar.gz cpython-59390279699f5c3c3367f914dfe954d703c62b95.tar.bz2 |
Closes #18807: pyvenv now takes a --copies argument allowing copies instead of symlinks even where symlinks are available and the default.
Diffstat (limited to 'Lib/venv/__init__.py')
-rw-r--r-- | Lib/venv/__init__.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 4adde5f..8d807d7 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -375,11 +375,17 @@ def main(args=None): use_symlinks = False else: use_symlinks = True - parser.add_argument('--symlinks', default=use_symlinks, - action='store_true', dest='symlinks', - help='Try to use symlinks rather than copies, ' - 'when symlinks are not the default for ' - 'the platform.') + group = parser.add_mutually_exclusive_group() + group.add_argument('--symlinks', default=use_symlinks, + action='store_true', dest='symlinks', + help='Try to use symlinks rather than copies, ' + 'when symlinks are not the default for ' + 'the platform.') + group.add_argument('--copies', default=not use_symlinks, + action='store_false', dest='symlinks', + help='Try to use copies rather than symlinks, ' + 'even when symlinks are the default for ' + 'the platform.') parser.add_argument('--clear', default=False, action='store_true', dest='clear', help='Delete the contents of the ' 'environment directory if it ' |