diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-12 01:46:47 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-12 01:46:47 +0000 |
commit | 74ead8ff5d0861e7adb4eca185a1f0beb1a54227 (patch) | |
tree | d73ecb1dafb07943d72de88807a140c2b4ede848 /Lib/distutils/command/install.py | |
parent | f8f2b98bdd9ba37c8cb416a56f1aab7d25071139 (diff) | |
download | cpython-git-74ead8ff5d0861e7adb4eca185a1f0beb1a54227.tar.gz |
Added --skip-build option, so lazy debuggers/testers (mainly me) don't
have to wade through all the 'build' output when testing installation.
Diffstat (limited to 'Lib/distutils/command/install.py')
-rw-r--r-- | Lib/distutils/command/install.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 3f6fa33fc6..4e68e00e95 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -77,6 +77,11 @@ class install (Command): ('install-data=', None, "installation directory for data files"), + # For lazy debuggers who just want to test the install + # commands without rerunning "build" all the time + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), + # Where to install documentation (eventually!) #('doc-format=', None, "format of documentation to generate"), #('install-man=', None, "directory for Unix man pages"), @@ -129,6 +134,8 @@ class install (Command): self.extra_path = None self.install_path_file = 0 + self.skip_build = 0 + # These are only here as a conduit from the 'build' command to the # 'install_*' commands that do the real work. ('build_base' isn't # actually used anywhere, but it might be useful in future.) They @@ -270,7 +277,10 @@ class install (Command): from distutils.fancy_getopt import longopt_xlate print msg + ":" for opt in self.user_options: - opt_name = string.translate (opt[0][0:-1], longopt_xlate) + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + opt_name = string.translate (opt_name, longopt_xlate) val = getattr (self, opt_name) print " %s: %s" % (opt_name, val) @@ -409,7 +419,8 @@ class install (Command): def run (self): # Obviously have to build before we can install - self.run_peer ('build') + if not self.skip_build: + self.run_peer ('build') # Run all sub-commands: currently this just means install all # Python modules using 'install_lib'. |