[New-bugs-announce] [issue6860] Inconsistent naming of custom command in setup.py help output

Patrick Näf report at bugs.python.org
Tue Sep 8 03:08:34 CEST 2009


New submission from Patrick Näf <herzbube at herzbube.ch>:

The attached setup.py file defines a custom command named "test", which
is implemented in a class named "TestClass". Try to run both of the
following:

1) ./setup.py test -h
2) ./setup.py --help-commands

In case 1, Distutils will use the class name to print the help output.
In case 2, it will use the command name. This behaviour is inconsistent.
As a developer, if I want to get the output right in both cases, I am
forced to use the same name both for the command class and the command
name (a string in a dictionary).

I propose that Distutils always use the command name. Besides fixing the
inconsistency, this solution gives the freedom to choose class names
back to the developer.

I have tested this behaviour on Mac OS X 10.5, both with the
system-provided Python 2.5 and custom-installed versions of Python 2.6
and 3.1.

----------
assignee: tarek
components: Distutils
files: setup.py
messages: 92405
nosy: herzbube, tarek
severity: normal
status: open
title: Inconsistent naming of custom command in setup.py help output
type: behavior
versions: Python 2.5, Python 2.6, Python 3.1
Added file: http://bugs.python.org/file14859/setup.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6860>
_______________________________________


More information about the New-bugs-announce mailing list