mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	The import check in setup.py fails on Mac OS X for Carbon-based modules
if you are not building while logged in to the console (you cannot connect to the window server, so the Carbon library doesn't initialize). Added a quick hack to skip the import test, with a warning, for modules linked against Carbon.
This commit is contained in:
		
							parent
							
								
									8cc705eabc
								
							
						
					
					
						commit
						f49c6f9954
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		
							
								
								
									
										5
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								setup.py
									
										
									
									
									
								
							|  | @ -154,6 +154,11 @@ def build_extension(self, ext): | ||||||
|             self.announce('WARNING: building of extension "%s" failed: %s' % |             self.announce('WARNING: building of extension "%s" failed: %s' % | ||||||
|                           (ext.name, sys.exc_info()[1])) |                           (ext.name, sys.exc_info()[1])) | ||||||
|             return |             return | ||||||
|  |         # Workaround for Mac OS X: The Carbon-based modules cannot be | ||||||
|  |         # reliably imported into a command-line Python | ||||||
|  |         if 'Carbon' in ext.extra_link_args: | ||||||
|  |         	self.announce('WARNING: skipping import check for Carbon-based "%s"' % ext.name) | ||||||
|  |         	return | ||||||
|         try: |         try: | ||||||
|             __import__(ext.name) |             __import__(ext.name) | ||||||
|         except ImportError: |         except ImportError: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jack Jansen
						Jack Jansen