mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Fix sdist to always include setup.cfg (#11092), to comply with the spec
This commit is contained in:
		
							parent
							
								
									078368fe4d
								
							
						
					
					
						commit
						7373fccd50
					
				
					 3 changed files with 32 additions and 19 deletions
				
			
		|  | @ -201,15 +201,20 @@ def get_file_list(self): | |||
|         self.filelist.write(self.manifest) | ||||
| 
 | ||||
|     def add_defaults(self): | ||||
|         """Add all the default files to self.filelist: | ||||
|           - all pure Python modules mentioned in setup script | ||||
|           - all files pointed by package_data (build_py) | ||||
|           - all files defined in data_files. | ||||
|           - all files defined as scripts. | ||||
|           - all C sources listed as part of extensions or C libraries | ||||
|             in the setup script (doesn't catch C headers!) | ||||
|         Everything is optional. | ||||
|         """Add all default files to self.filelist. | ||||
| 
 | ||||
|         In addition to the setup.cfg file, this will include all files returned | ||||
|         by the get_source_files of every registered command.  This will find | ||||
|         Python modules and packages, data files listed in package_data_, | ||||
|         data_files and extra_files, scripts, C sources of extension modules or | ||||
|         C libraries (headers are missing). | ||||
|         """ | ||||
|         if os.path.exists('setup.cfg'): | ||||
|             self.filelist.append('setup.cfg') | ||||
|         else: | ||||
|             logger.warning("%s: standard 'setup.cfg' file not found", | ||||
|                            self.get_command_name()) | ||||
| 
 | ||||
|         for cmd_name in get_command_names(): | ||||
|             try: | ||||
|                 cmd_obj = self.get_finalized_command(cmd_name) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Éric Araujo
						Éric Araujo