[Python-checkins] CVS: distutils/distutils dist.py,1.8,1.9

Greg Ward python-dev@python.org
Sun, 7 May 2000 11:30:36 -0400 (EDT)


Update of /projects/cvsroot/distutils/distutils
In directory newcnri:/tmp/cvs-serv27663

Modified Files:
	dist.py 
Log Message:
Got rid of several little-used and not-very-useful methods: 'get_option()',
'get_options()', 'get_command_option()', 'get_command_options()'.


Index: dist.py
===================================================================
RCS file: /projects/cvsroot/distutils/distutils/dist.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** dist.py	2000/04/26 02:26:55	1.8
--- dist.py	2000/05/07 15:30:31	1.9
***************
*** 7,11 ****
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: dist.py,v 1.8 2000/04/26 02:26:55 gward Exp $"
  
  import sys, string, re
--- 7,11 ----
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: dist.py,v 1.9 2000/05/07 15:30:31 gward Exp $"
  
  import sys, string, re
***************
*** 262,267 ****
  
              # 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.
              if not isinstance (cmd_obj, Command):
                  raise DistutilsClassError, \
--- 262,267 ----
  
              # Require that the command class be derived from Command --
!             # want to be sure that the basic "command" interface is
!             # implemented.
              if not isinstance (cmd_obj, Command):
                  raise DistutilsClassError, \
***************
*** 530,551 ****
  
  
-     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 --------------------------
  
--- 530,533 ----
***************
*** 569,599 ****
          cmd_obj.run ()
          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)
  
  
--- 551,554 ----