mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Use the new 'has_pure_modules()', 'has_ext_modules()', 'has_c_libraries()'
methods of Distribution instead of grovelling directly in self.distribution.
This commit is contained in:
		
							parent
							
								
									4d16e0ac20
								
							
						
					
					
						commit
						ae45b16157
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -80,18 +80,18 @@ def run (self):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Invoke the 'build_py' command to "build" pure Python modules
 | 
					        # Invoke the 'build_py' command to "build" pure Python modules
 | 
				
			||||||
        # (ie. copy 'em into the build tree)
 | 
					        # (ie. copy 'em into the build tree)
 | 
				
			||||||
        if self.distribution.packages or self.distribution.py_modules:
 | 
					        if self.distribution.has_pure_modules():
 | 
				
			||||||
            self.run_peer ('build_py')
 | 
					            self.run_peer ('build_py')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Build any standalone C libraries next -- they're most likely to
 | 
					        # Build any standalone C libraries next -- they're most likely to
 | 
				
			||||||
        # be needed by extension modules, so obviously have to be done
 | 
					        # be needed by extension modules, so obviously have to be done
 | 
				
			||||||
        # first!
 | 
					        # first!
 | 
				
			||||||
        if self.distribution.libraries:
 | 
					        if self.distribution.has_c_libraries():
 | 
				
			||||||
            self.run_peer ('build_clib')
 | 
					            self.run_peer ('build_clib')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # And now 'build_ext' -- compile extension modules and put them
 | 
					        # And now 'build_ext' -- compile extension modules and put them
 | 
				
			||||||
        # into the build tree
 | 
					        # into the build tree
 | 
				
			||||||
        if self.distribution.ext_modules:
 | 
					        if self.distribution.has_ext_modules():
 | 
				
			||||||
            self.run_peer ('build_ext')
 | 
					            self.run_peer ('build_ext')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# end class Build
 | 
					# end class Build
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue