mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	In 'install_misc' class:
- renamed '_copydata()' to 'copy_files()' - changed it to record complete output filenames - dropped '_outputdata()' in favour of much simpler 'get_outputs()'
This commit is contained in:
		
							parent
							
								
									147e5f3c65
								
							
						
					
					
						commit
						ce2b6b838f
					
				
					 1 changed files with 7 additions and 10 deletions
				
			
		|  | @ -8,7 +8,7 @@ | ||||||
| 
 | 
 | ||||||
| __revision__ = "$Id$" | __revision__ = "$Id$" | ||||||
| 
 | 
 | ||||||
| import sys, string | import sys, os, string | ||||||
| from types import * | from types import * | ||||||
| from distutils.errors import * | from distutils.errors import * | ||||||
| from distutils import util | from distutils import util | ||||||
|  | @ -355,23 +355,20 @@ def initialize_options (self): | ||||||
|         self.install_dir = None |         self.install_dir = None | ||||||
|         self.outfiles = None |         self.outfiles = None | ||||||
| 
 | 
 | ||||||
|     def _install_dir_from(self, dirname): |     def _install_dir_from (self, dirname): | ||||||
|         self.set_undefined_options('install', (dirname, 'install_dir')) |         self.set_undefined_options('install', (dirname, 'install_dir')) | ||||||
| 
 | 
 | ||||||
|     def _copydata(self, filelist): |     def _copy_files (self, filelist): | ||||||
|         self.outfiles = [] |         self.outfiles = [] | ||||||
|         if not filelist: |         if not filelist: | ||||||
|             return |             return | ||||||
|         self.mkpath(self.install_dir) |         self.mkpath(self.install_dir) | ||||||
|         for f in filelist: |         for f in filelist: | ||||||
|             self.outfiles.append(self.copy_file (f, self.install_dir)) |             self.copy_file(f, self.install_dir) | ||||||
| 
 |             self.outfiles.append(os.path.join(self.install_dir, f)) | ||||||
|     def _outputdata(self, filelist): |  | ||||||
|         if self.outfiles is not None: |  | ||||||
|             return self.outfiles |  | ||||||
|         # XXX de-lambda-fy |  | ||||||
|         return map(lambda x: os.path.join(self.install_dir, x), filelist) |  | ||||||
| 
 | 
 | ||||||
|  |     def get_outputs (self): | ||||||
|  |         return self.outfiles | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| if __name__ == "__main__": | if __name__ == "__main__": | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gregory P. Smith
						Gregory P. Smith