From 99b032eaf24e1887f6451eceea7f1e24ced05a0f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:41:15 +0000 Subject: [PATCH] Added 'boolean_options' list to support config file parsing. --- Lib/distutils/command/bdist_dumb.py | 2 ++ Lib/distutils/command/bdist_rpm.py | 2 ++ Lib/distutils/command/bdist_wininst.py | 2 ++ Lib/distutils/command/build.py | 2 ++ Lib/distutils/command/build_clib.py | 2 ++ Lib/distutils/command/build_ext.py | 2 ++ Lib/distutils/command/build_py.py | 2 ++ Lib/distutils/command/build_scripts.py | 2 ++ Lib/distutils/command/clean.py | 2 ++ Lib/distutils/command/install.py | 2 ++ Lib/distutils/command/install_data.py | 2 ++ Lib/distutils/command/install_headers.py | 1 + Lib/distutils/command/install_lib.py | 2 ++ Lib/distutils/command/install_scripts.py | 3 +++ Lib/distutils/command/sdist.py | 3 +++ 15 files changed, 31 insertions(+) diff --git a/Lib/distutils/command/bdist_dumb.py b/Lib/distutils/command/bdist_dumb.py index 1fdbf4253b0..520098db19f 100644 --- a/Lib/distutils/command/bdist_dumb.py +++ b/Lib/distutils/command/bdist_dumb.py @@ -32,6 +32,8 @@ class bdist_dumb (Command): "directory to put final built distributions in"), ] + boolean_options = ['keep-temp'] + default_format = { 'posix': 'gztar', 'nt': 'zip', } diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py index 2afc7146701..d585e8c660a 100644 --- a/Lib/distutils/command/bdist_rpm.py +++ b/Lib/distutils/command/bdist_rpm.py @@ -111,6 +111,8 @@ class bdist_rpm (Command): "RPM 2 compatibility mode"), ] + boolean_options = ['keep-temp', 'rpm2-mode'] + negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', 'rpm2-mode': 'rpm3-mode'} diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py index b4c6d9b4b6f..16dd8022a02 100644 --- a/Lib/distutils/command/bdist_wininst.py +++ b/Lib/distutils/command/bdist_wininst.py @@ -33,6 +33,8 @@ class bdist_wininst (Command): "directory to put final built distributions in"), ] + boolean_options = ['keep-temp'] + def initialize_options (self): self.bdist_dir = None self.keep_temp = 0 diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py index 15476ca11b6..f30f4ee1da4 100644 --- a/Lib/distutils/command/build.py +++ b/Lib/distutils/command/build.py @@ -42,6 +42,8 @@ class build (Command): "forcibly build everything (ignore file timestamps)"), ] + boolean_options = ['debug', 'force'] + help_options = [ ('help-compiler', None, "list available compilers", show_compilers), diff --git a/Lib/distutils/command/build_clib.py b/Lib/distutils/command/build_clib.py index 450dae1754f..775b7ade5a3 100644 --- a/Lib/distutils/command/build_clib.py +++ b/Lib/distutils/command/build_clib.py @@ -48,6 +48,8 @@ class build_clib (Command): "specify the compiler type"), ] + boolean_options = ['debug', 'force'] + help_options = [ ('help-compiler', None, "list available compilers", show_compilers), diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index d578b846aca..7fdfd1458db 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -82,6 +82,8 @@ class build_ext (Command): "make SWIG create C++ files (default is C)"), ] + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] + help_options = [ ('help-compiler', None, "list available compilers", show_compilers), diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 5fcd18e7883..ea92c2be0f2 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -23,6 +23,8 @@ class build_py (Command): ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] + boolean_options = ['force'] + def initialize_options (self): self.build_lib = None diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py index 17fae8f7b55..eacf798996e 100644 --- a/Lib/distutils/command/build_scripts.py +++ b/Lib/distutils/command/build_scripts.py @@ -22,6 +22,8 @@ class build_scripts (Command): ('force', 'f', "forcibly build everything (ignore file timestamps"), ] + boolean_options = ['force'] + def initialize_options (self): self.build_dir = None diff --git a/Lib/distutils/command/clean.py b/Lib/distutils/command/clean.py index 2f3597fdbca..4f04f08be52 100644 --- a/Lib/distutils/command/clean.py +++ b/Lib/distutils/command/clean.py @@ -28,6 +28,8 @@ class clean (Command): "remove all build output, not just temporary by-products") ] + boolean_options = ['all'] + def initialize_options(self): self.build_base = None self.build_lib = None diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 573e0740eba..4ad652d9908 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -106,6 +106,8 @@ class install (Command): "filename in which to record list of installed files"), ] + boolean_options = ['force', 'skip-build'] + def initialize_options (self): diff --git a/Lib/distutils/command/install_data.py b/Lib/distutils/command/install_data.py index af348f5190c..9ce118394b6 100644 --- a/Lib/distutils/command/install_data.py +++ b/Lib/distutils/command/install_data.py @@ -25,6 +25,8 @@ class install_data (Command): ('force', 'f', "force installation (overwrite existing files)"), ] + boolean_options = ['force'] + def initialize_options (self): self.install_dir = None self.outfiles = [] diff --git a/Lib/distutils/command/install_headers.py b/Lib/distutils/command/install_headers.py index 5c06d574d61..ec0cf4412dd 100644 --- a/Lib/distutils/command/install_headers.py +++ b/Lib/distutils/command/install_headers.py @@ -21,6 +21,7 @@ class install_headers (Command): "force installation (overwrite existing files)"), ] + boolean_options = ['force'] def initialize_options (self): self.install_dir = None diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index b104fa9cfcc..a603b4f59ee 100644 --- a/Lib/distutils/command/install_lib.py +++ b/Lib/distutils/command/install_lib.py @@ -19,6 +19,8 @@ class install_lib (Command): ('skip-build', None, "skip the build steps"), ] + boolean_options = ['force', 'compile', 'optimize', 'skip-build'] + def initialize_options (self): # let the 'install' command dictate our installation directory diff --git a/Lib/distutils/command/install_scripts.py b/Lib/distutils/command/install_scripts.py index d506f90f511..b8938c48de9 100644 --- a/Lib/distutils/command/install_scripts.py +++ b/Lib/distutils/command/install_scripts.py @@ -22,6 +22,9 @@ class install_scripts (Command): ('skip-build', None, "skip the build steps"), ] + boolean_options = ['force', 'skip-build'] + + def initialize_options (self): self.install_dir = None self.force = 0 diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 9b9f6064c51..ec443a30680 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -67,6 +67,9 @@ class sdist (Command): "[default: dist]"), ] + boolean_options = ['use-defaults', 'prune', + 'manifest-only', 'force-manifest', + 'keep-tree'] help_options = [ ('help-formats', None,