]> granicus.if.org Git - python/commitdiff
Patch #1104111: Alter setup.py --help and --help-commands.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 3 Mar 2005 08:12:27 +0000 (08:12 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 3 Mar 2005 08:12:27 +0000 (08:12 +0000)
Lib/distutils/command/clean.py
Lib/distutils/dist.py
Misc/NEWS

index 1844ffefd37ca5947a6bd7a4f3931649689efd6b..02189c531a8e7be1aed789e6e53561412ae6f372 100644 (file)
@@ -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')"),
index 9eb2aa424c154997422cbb8e1daeb436cc48d218..4f4bae5218d7b6b487210c4cd5c2e96b9d71b014 100644 (file)
@@ -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:
index 42ef277c3d37f9119f374ec5463dd64cfccd2864..a128cc78234a365b8c9515eb3470fc54e90b78e2 100644 (file)
--- 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.