classification
Title: "python setup.py cmd --verbose" does not set verbosity
Type: behavior Stage:
Components: Distutils, Distutils2 Versions: Python 3.2, Python 3.1, Python 2.7, 3rd party
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: eric.araujo, tarek, zooko
Priority: normal Keywords: easy

Created on 2009-10-25 14:37 by zooko, last changed 2010-11-18 01:51 by eric.araujo.

Messages (2)
msg94453 - (view) Author: Zooko O'Whielacronx (zooko) Date: 2009-10-25 14:37
This command:

python setup.py --verbose darcsver

works as expected -- the presence of '--verbose' increases the verbosity
of logging.

This command:

python setup.py darcsver --verbose

does not increase the verbosity, nor does it tell me that the
"--verbose" option is an option unknown to the "darcsver" command.

This command:

python setup.py darcsver --quux

gives this helpful output:

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or:
setup.py cmd --help

error: option --quux not recognized

I think that the middle command ("python setup.py darcsver --verbose")
ought to behave either like the first command by increasing the
verbosity, or like the last command by telling the user that "--verbose"
is not a known option in that position.

This is also http://bitbucket.org/tarek/distribute/issue/78/
msg94518 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-10-26 22:00
There's this comment in dist.py:

# All commands support the global options too, just by adding
# in 'global_options'.

So, that's a bug. I'll do this:

- if a command has a global option (except help) it will be reapplied to
the distribtuion object

- if a command has a global option (except help) but also defines it as
a local command option, it will not be reapplied to the distribtuion object

- if a command has a global option (except help) and it was already
provided at the regular place, it will be ignored and a warning will be
displayed.
History
Date User Action Args
2010-11-18 01:51:08eric.araujosetversions: + 3rd party, Python 3.1, Python 2.7, Python 3.2
nosy: zooko, tarek, eric.araujo
title: "python setup.py MYCOMMAND --verbose" does not yield an unrecognized option error but also does not set the verbosity -> "python setup.py cmd --verbose" does not set verbosity
components: + Distutils2
type: behavior
keywords: + easy
resolution: accepted ->
2010-06-06 22:32:11eric.araujosetnosy: + eric.araujo
2009-10-26 22:00:59tareksetpriority: normal
resolution: accepted
messages: + msg94518
2009-10-25 14:37:07zookocreate