(original) (raw)

changeset: 85373:ffb01a6c0960 user: Vinay Sajip <vinay_sajip@yahoo.co.uk> date: Sun Aug 25 00:04:06 2013 +0100 files: Lib/venv/__init__.py Misc/NEWS description: Closes #18807: pyvenv now takes a --copies argument allowing copies instead of symlinks even where symlinks are available and the default. diff -r 70d1dc219eb6 -r ffb01a6c0960 Lib/venv/__init__.py --- a/Lib/venv/__init__.py Sat Aug 24 23:46:27 2013 +0100 +++ b/Lib/venv/__init__.py Sun Aug 25 00:04:06 2013 +0100 @@ -375,11 +375,17 @@ 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 ' diff -r 70d1dc219eb6 -r ffb01a6c0960 Misc/NEWS --- a/Misc/NEWS Sat Aug 24 23:46:27 2013 +0100 +++ b/Misc/NEWS Sun Aug 25 00:04:06 2013 +0100 @@ -40,6 +40,9 @@ 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Ă¹. </vinay_sajip@yahoo.co.uk>