]> granicus.if.org Git - python/commitdiff
Closes #18807: pyvenv now takes a --copies argument allowing copies instead of symlin...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sat, 24 Aug 2013 23:04:06 +0000 (00:04 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sat, 24 Aug 2013 23:04:06 +0000 (00:04 +0100)
Lib/venv/__init__.py
Misc/NEWS

index 4adde5f58e9ed5b490261c6935686117bdeeec8d..8d807d79e08078a24504a32b2dcb140d97d70a09 100644 (file)
@@ -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 '
index 55aca6491705357c0349ae2f52444ecb86c0a9a7..621a3a85f94a6408872b4ac72d7597828e07c84e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -40,6 +40,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #18807: ``pyvenv`` now takes a --copies argument allowing copies
+  instead of symlinks even where symlinks are available and the default.
+
 - Issue #18538: ``python -m dis`` now uses argparse for argument processing.
   Patch by Michele OrrĂ¹.