[Python-checkins] CVS: python/dist/src/Lib/distutils/command install_data.py,1.18,1.19

A.M. Kuchling akuchling@users.sourceforge.net
Tue, 04 Sep 2001 13:42:10 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv22233

Modified Files:
	install_data.py 
Log Message:
[Bug #444589] Record empty directories in the install_data command
   Slightly modified version of patch from Jon Nelson (jnelson).


Index: install_data.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_data.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** install_data.py	2001/02/05 17:43:11	1.18
--- install_data.py	2001/09/04 20:42:08	1.19
***************
*** 64,71 ****
                      dir = change_root(self.root, dir)
                  self.mkpath(dir)
!                 for data in f[1]:
!                     data = convert_path(data)
!                     (out, _) = self.copy_file(data, dir)
!                     self.outfiles.append(out)
  
      def get_inputs (self):
--- 64,79 ----
                      dir = change_root(self.root, dir)
                  self.mkpath(dir)
! 
!                 if f[1] == []:
!                     # If there are no files listed, the user must be
!                     # trying to create an empty directory, so add the
!                     # directory to the list of output files.
!                     self.outfiles.append(dir)
!                 else:
!                     # Copy files, adding them to the list of output files.
!                     for data in f[1]:
!                         data = convert_path(data)
!                         (out, _) = self.copy_file(data, dir)
!                         self.outfiles.append(out)
  
      def get_inputs (self):