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

Greg Ward python-dev@python.org
Tue, 20 Jun 2000 20:12:09 -0700


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

Modified Files:
	install_data.py 
Log Message:
Build the 'outfiles' list so 'get_outputs()' has something to return.
(Bug spotted and originally fixed by Rene Liebscher; fix redone by me.)


Index: install_data.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/install_data.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** install_data.py	2000/06/06 02:18:13	1.8
--- install_data.py	2000/06/21 03:12:07	1.9
***************
*** 26,30 ****
      def initialize_options (self):
          self.install_dir = None
!         self.outfiles = None
          self.root = None
          self.data_files = self.distribution.data_files
--- 26,30 ----
      def initialize_options (self):
          self.install_dir = None
!         self.outfiles = []
          self.root = None
          self.data_files = self.distribution.data_files
***************
*** 41,45 ****
              if type(f) == StringType:
                  # its a simple file, so copy it
!                 self.copy_file(f, self.install_dir)
              else:
                  # its a tuple with path to install to and a list of files
--- 41,46 ----
              if type(f) == StringType:
                  # its a simple file, so copy it
!                 out = self.copy_file(f, self.install_dir)
!                 self.outfiles.append(out)
              else:
                  # its a tuple with path to install to and a list of files
***************
*** 51,55 ****
                  self.mkpath(dir)
                  for data in f[1]:
!                     self.copy_file(data, dir)
  
      def get_inputs (self):
--- 52,57 ----
                  self.mkpath(dir)
                  for data in f[1]:
!                     out = self.copy_file(data, dir)
!                     self.outfiles.append(out)
  
      def get_inputs (self):
***************
*** 57,59 ****
  
      def get_outputs (self):
!         return self.outfiles or []
--- 59,61 ----
  
      def get_outputs (self):
!         return self.outfiles