[Python-checkins] CVS: distutils/distutils/command install.py,1.48,1.49

Greg Ward python-dev@python.org
Sat, 30 Sep 2000 10:05:46 -0700


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

Modified Files:
	install.py 
Log Message:
Moved some things around for better organization.

Index: install.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/install.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** install.py	2000/09/25 01:41:15	1.48
--- install.py	2000/09/30 17:05:37	1.49
***************
*** 174,177 ****
--- 174,184 ----
          self.record = None
  
+ 
+     # -- Option finalizing methods -------------------------------------
+     # (This is rather more involved than for most commands,
+     # because this is where the policy for installing third-
+     # party Python modules on various platforms given a wide
+     # array of user input is decided.  Yes, it's quite complex!)
+ 
      def finalize_options (self):
  
***************
*** 451,454 ****
--- 458,463 ----
  
  
+     # -- Command execution methods -------------------------------------
+ 
      def run (self):
  
***************
*** 486,508 ****
  
      # run ()
- 
- 
-     # -- Predicates for sub-command list -------------------------------
- 
-     def has_lib (self):
-         """Return true if the current distribution has any Python
-         modules to install."""
-         return (self.distribution.has_pure_modules() or
-                 self.distribution.has_ext_modules())
- 
-     def has_headers (self):
-         return self.distribution.has_headers()
  
!     def has_scripts (self):
!         return self.distribution.has_scripts()
  
-     def has_data (self):
-         return self.distribution.has_data_files()
  
  
      def get_outputs (self):
--- 495,511 ----
  
      # run ()
  
!     def create_path_file (self):
!         filename = os.path.join (self.install_libbase,
!                                  self.path_file + ".pth")
!         if self.install_path_file:
!             self.execute (write_file,
!                           (filename, [self.extra_dirs]),
!                           "creating %s" % filename)
!         else:
!             self.warn("path file '%s' not created" % filename)
  
  
+     # -- Reporting methods ---------------------------------------------
  
      def get_outputs (self):
***************
*** 516,520 ****
          return outputs
  
- 
      def get_inputs (self):
          # XXX gee, this looks familiar ;-(
--- 519,522 ----
***************
*** 527,539 ****
  
  
!     def create_path_file (self):
!         filename = os.path.join (self.install_libbase,
!                                  self.path_file + ".pth")
!         if self.install_path_file:
!             self.execute (write_file,
!                           (filename, [self.extra_dirs]),
!                           "creating %s" % filename)
!         else:
!             self.warn("path file '%s' not created" % filename)
  
      # 'sub_commands': a list of commands this command might have to run to
--- 529,549 ----
  
  
!     # -- Predicates for sub-command list -------------------------------
! 
!     def has_lib (self):
!         """Return true if the current distribution has any Python
!         modules to install."""
!         return (self.distribution.has_pure_modules() or
!                 self.distribution.has_ext_modules())
! 
!     def has_headers (self):
!         return self.distribution.has_headers()
! 
!     def has_scripts (self):
!         return self.distribution.has_scripts()
! 
!     def has_data (self):
!         return self.distribution.has_data_files()
! 
  
      # 'sub_commands': a list of commands this command might have to run to