diff options
author | Greg Ward <gward@python.net> | 2000-05-07 15:30:31 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-05-07 15:30:31 (GMT) |
commit | c4537ac9b65be40ce3d803196845a9e9b7fb3513 (patch) | |
tree | f8844096a979a6a3940e915660d1c619750f4f8d /Lib | |
parent | f4f8e64957f672b4a5d58c3fa9acb59518416010 (diff) | |
download | cpython-c4537ac9b65be40ce3d803196845a9e9b7fb3513.zip cpython-c4537ac9b65be40ce3d803196845a9e9b7fb3513.tar.gz cpython-c4537ac9b65be40ce3d803196845a9e9b7fb3513.tar.bz2 |
Got rid of several little-used and not-very-useful methods: 'get_option()',
'get_options()', 'get_command_option()', 'get_command_options()'.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/dist.py | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py index ae95009..f1ac35e 100644 --- a/Lib/distutils/dist.py +++ b/Lib/distutils/dist.py @@ -261,8 +261,8 @@ class Distribution: raise DistutilsArgError, msg # Require that the command class be derived from Command -- - # that way, we can be sure that we at least have the 'run' - # and 'get_option' methods. + # want to be sure that the basic "command" interface is + # implemented. if not isinstance (cmd_obj, Command): raise DistutilsClassError, \ "command class %s must subclass Command" % \ @@ -529,24 +529,6 @@ class Distribution: self.run_command (cmd) - def get_option (self, option): - """Return the value of a distribution option. Raise - AttributeError if 'option' is not known.""" - return getattr (self, opt) - - - def get_options (self, *options): - """Return (as a tuple) the values of several distribution - options. Raise AttributeError if any element of - 'options' is not known.""" - - values = [] - for opt in options: - values.append (getattr (self, opt)) - - return tuple (values) - - # -- Methods that operate on its Commands -------------------------- def run_command (self, command): @@ -570,33 +552,6 @@ class Distribution: self.have_run[command] = 1 - def get_command_option (self, command, option): - """Create a command object for 'command' if necessary, ensure that - its option values are all set to their final values, and return - the value of its 'option' option. Raise AttributeError if - 'option' is not known for that 'command'.""" - - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - return cmd_obj.get_option (option) - - - def get_command_options (self, command, *options): - """Create a command object for 'command' if necessary, ensure that - its option values are all set to their final values, and return - a tuple containing the values of all the options listed in - 'options' for that command. Raise DistutilsOptionError if any - invalid option is supplied in 'options'.""" - - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - values = [] - for opt in options: - values.append (getattr (cmd_obj, option)) - - return tuple (values) - - # -- Distribution query methods ------------------------------------ def has_pure_modules (self): |