Tarek Ziadé <[EMAIL PROTECTED]> added the comment: patch with more tests and explanations...
for the -r option, the standard call without the change would be: $ python setup.py register -r pypi sdist upload -r pypi which is very redundant. That's why config.py looks into args. To avoid collisions, the right thing to do imho would be to have a "shared_options" dict in the command classes to allow a given command to get some options from another. For instance, in the register command, in pseudo-code: class register: shared_options = {'upload': ['repository']} and in the upload one: class upload: shared_options = {'register': ['repository']} If register and upload are both present in the command line, then the option is made available to both commands. For instance, this two lines would provide the repository to the two commands: $ python setup.py register -r pypi sdist upload $ python setup.py register sdist upload -r pypi (preferred way) But this will be a patch proposition on its own. Added file: http://bugs.python.org/file9652/distutils.2008.03.11.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1858> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com