mirror of
https://github.com/python/cpython.git
synced 2024-11-25 02:44:06 +08:00
Patch #1104111: Alter setup.py --help and --help-commands.
This commit is contained in:
parent
5dc8ced4a8
commit
8ed338ab44
@ -15,7 +15,7 @@ from distutils import log
|
||||
|
||||
class clean (Command):
|
||||
|
||||
description = "clean up output of 'build' command"
|
||||
description = "clean up temporary files from 'build' command"
|
||||
user_options = [
|
||||
('build-base=', 'b',
|
||||
"base build directory (default: 'build.build-base')"),
|
||||
|
@ -59,6 +59,15 @@ class Distribution:
|
||||
('help', 'h', "show detailed help message"),
|
||||
]
|
||||
|
||||
# 'common_usage' is a short (2-3 line) string describing the common
|
||||
# usage of the setup script.
|
||||
common_usage = """\
|
||||
Common commands: (see '--help-commands' for more)
|
||||
|
||||
setup.py build will build the package underneath 'build/'
|
||||
setup.py install will install the package
|
||||
"""
|
||||
|
||||
# options that are not propagated to the commands
|
||||
display_options = [
|
||||
('help-commands', None,
|
||||
@ -608,7 +617,7 @@ class Distribution:
|
||||
else:
|
||||
options = self.global_options
|
||||
parser.set_option_table(options)
|
||||
parser.print_help("Global options:")
|
||||
parser.print_help(self.common_usage + "\nGlobal options:")
|
||||
print
|
||||
|
||||
if display_options:
|
||||
|
Loading…
Reference in New Issue
Block a user