diff options
| author | Éric Araujo <merwok@netwok.org> | 2012-02-09 13:29:11 (GMT) |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2012-02-09 13:29:11 (GMT) |
| commit | 5c69b66086e9665b4e9afefa7854cbd966d386e4 (patch) | |
| tree | d991bf0c9c1a51a971edb2bca1e061259b9f6f74 /Lib/packaging/run.py | |
| parent | 1aa54a417d767efb2ebb4c1a31e69f7be9b1d6ae (diff) | |
| download | cpython-5c69b66086e9665b4e9afefa7854cbd966d386e4.zip cpython-5c69b66086e9665b4e9afefa7854cbd966d386e4.tar.gz cpython-5c69b66086e9665b4e9afefa7854cbd966d386e4.tar.bz2 | |
Group commands by topic in “pysetup run --list-commands” output.
This fixes a regression from distutils, where “setup.py --help-commands”
prints out commands grouped by topic (i.e. building vs. installing),
which is more useful than using sorted.
Diffstat (limited to 'Lib/packaging/run.py')
| -rw-r--r-- | Lib/packaging/run.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/packaging/run.py b/Lib/packaging/run.py index 4756f7c..c3600a7 100644 --- a/Lib/packaging/run.py +++ b/Lib/packaging/run.py @@ -254,16 +254,13 @@ def _run(dispatcher, args, **kw): parser = dispatcher.parser args = args[1:] - commands = STANDARD_COMMANDS # + extra commands + commands = STANDARD_COMMANDS # FIXME display extra commands if args == ['--list-commands']: print('List of available commands:') - cmds = sorted(commands) - - for cmd in cmds: + for cmd in commands: cls = dispatcher.cmdclass.get(cmd) or get_command_class(cmd) - desc = getattr(cls, 'description', - '(no description available)') + desc = getattr(cls, 'description', '(no description available)') print(' %s: %s' % (cmd, desc)) return |
