Author tarek
Recipients akuchling, christian.heimes, tarek
Date 2008-03-11.00:49:43
SpamBayes Score 0.262096
Marked as misclassified No
Message-id <1205196650.76.0.791361536995.issue1858@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-03-11 00:50:50tareksetspambayes_score: 0.262096 -> 0.262096
recipients: + tarek, akuchling, christian.heimes
2008-03-11 00:50:50tareksetspambayes_score: 0.262096 -> 0.262096
messageid: <1205196650.76.0.791361536995.issue1858@psf.upfronthosting.co.za>
2008-03-11 00:49:47tareklinkissue1858 messages
2008-03-11 00:49:47tarekcreate