[Python-checkins] CVS: distutils/distutils cmd.py,1.12,1.13 dist.py,1.19,1.20

Greg Ward python-dev@python.org
Sat, 27 May 2000 10:27:25 -0700


Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21276

Modified Files:
	cmd.py dist.py 
Log Message:
Some far-reaching naming changes:
  * Command method 'find_peer()' -> 'get_finalized_command()'
  * Command method 'run_peer()' -> 'run_command()'
Also deleted the 'get_command_option()' method from Command, and
  fixed the one place where it was used (in "bdist_dumb").


Index: cmd.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/cmd.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** cmd.py	2000/05/25 01:26:23	1.12
--- cmd.py	2000/05/27 17:27:22	1.13
***************
*** 7,11 ****
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: cmd.py,v 1.12 2000/05/25 01:26:23 gward Exp $"
  
  import sys, os, string
--- 7,11 ----
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: cmd.py,v 1.13 2000/05/27 17:27:22 gward Exp $"
  
  import sys, os, string
***************
*** 70,78 ****
          self.help = 0
  
!         # 'ready' records whether or not 'finalize_options()' has been
          # called.  'finalize_options()' itself should not pay attention to
!         # this flag: it is the business of 'ensure_ready()', which always
!         # calls 'finalize_options()', to respect/update it.
!         self.ready = 0
  
      # __init__ ()
--- 70,78 ----
          self.help = 0
  
!         # 'finalized' records whether or not 'finalize_options()' has been
          # called.  'finalize_options()' itself should not pay attention to
!         # this flag: it is the business of 'ensure_finalized()', which
!         # always calls 'finalize_options()', to respect/update it.
!         self.finalized = 0
  
      # __init__ ()
***************
*** 90,97 ****
  
  
!     def ensure_ready (self):
!         if not self.ready:
              self.finalize_options ()
!         self.ready = 1
          
  
--- 90,97 ----
  
  
!     def ensure_finalized (self):
!         if not self.finalized:
              self.finalize_options ()
!         self.finalized = 1
          
  
***************
*** 185,189 ****
  
          src_cmd_obj = self.distribution.get_command_obj (src_cmd)
!         src_cmd_obj.ensure_ready ()
          for (src_option, dst_option) in option_pairs:
              if getattr (self, dst_option) is None:
--- 185,189 ----
  
          src_cmd_obj = self.distribution.get_command_obj (src_cmd)
!         src_cmd_obj.ensure_finalized ()
          for (src_option, dst_option) in option_pairs:
              if getattr (self, dst_option) is None:
***************
*** 192,196 ****
  
  
!     def find_peer (self, command, create=1):
          """Wrapper around Distribution's 'get_command_obj()' method:
             find (create if necessary and 'create' is true) the command
--- 192,196 ----
  
  
!     def get_finalized_command (self, command, create=1):
          """Wrapper around Distribution's 'get_command_obj()' method:
             find (create if necessary and 'create' is true) the command
***************
*** 198,214 ****
  
          cmd_obj = self.distribution.get_command_obj (command, create)
!         cmd_obj.ensure_ready ()
          return cmd_obj
  
  
!     def get_peer_option (self, command, option):
!         """Find or create the command object for 'command', and return
!            its 'option' option."""
! 
!         cmd_obj = self.find_peer (command)
!         return getattr(cmd_obj, option)
! 
! 
!     def run_peer (self, command):
          """Run some other command: uses the 'run_command()' method of
             Distribution, which creates the command object if necessary
--- 198,206 ----
  
          cmd_obj = self.distribution.get_command_obj (command, create)
!         cmd_obj.ensure_finalized ()
          return cmd_obj
  
  
!     def run_command (self, command):
          """Run some other command: uses the 'run_command()' method of
             Distribution, which creates the command object if necessary

Index: dist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/dist.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** dist.py	2000/05/27 01:36:14	1.19
--- dist.py	2000/05/27 17:27:22	1.20
***************
*** 7,11 ****
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: dist.py,v 1.19 2000/05/27 01:36:14 gward Exp $"
  
  import sys, os, string, re
--- 7,11 ----
  # (extricated from core.py; actually dates back to the beginning)
  
! __revision__ = "$Id: dist.py,v 1.20 2000/05/27 17:27:22 gward Exp $"
  
  import sys, os, string, re
***************
*** 682,686 ****
          self.announce ("running " + command)
          cmd_obj = self.get_command_obj (command)
!         cmd_obj.ensure_ready ()
          cmd_obj.run ()
          self.have_run[command] = 1
--- 682,686 ----
          self.announce ("running " + command)
          cmd_obj = self.get_command_obj (command)
!         cmd_obj.ensure_finalized ()
          cmd_obj.run ()
          self.have_run[command] = 1