From 8ed338ab44daf3cd681d73156fd1d9b6bed53795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Mar 2005 08:12:27 +0000 Subject: Patch #1104111: Alter setup.py --help and --help-commands. --- Lib/distutils/command/clean.py | 2 +- Lib/distutils/dist.py | 11 ++++++++++- Misc/NEWS | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Lib/distutils/command/clean.py b/Lib/distutils/command/clean.py index 1844ffe..02189c5 100644 --- a/Lib/distutils/command/clean.py +++ b/Lib/distutils/command/clean.py @@ -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')"), diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py index 9eb2aa4..4f4bae5 100644 --- a/Lib/distutils/dist.py +++ b/Lib/distutils/dist.py @@ -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: diff --git a/Misc/NEWS b/Misc/NEWS index 42ef277..a128cc7 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -59,6 +59,8 @@ Extension Modules Library ------- +- Patch #1104111: Alter setup.py --help and --help-commands. + - Patch #1121234: Properly cleanup _exit and tkerror commands. - Patch #1049151: xdrlib now unpacks booleans as True or False. -- cgit v0.12