mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-10-31 16:07:51 +03:00 
			
		
		
		
	Limit ABI3 builds to CPython only
This commit is contained in:
		
							parent
							
								
									29b9c09e64
								
							
						
					
					
						commit
						6629b9eb8a
					
				
							
								
								
									
										8
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								setup.py
									
									
									
									
									
								
							|  | @ -1,13 +1,17 @@ | |||
| """`Dependency injector` setup script.""" | ||||
| 
 | ||||
| import os | ||||
| import sys | ||||
| 
 | ||||
| from Cython.Build import cythonize | ||||
| from Cython.Compiler import Options | ||||
| from setuptools import Extension, setup | ||||
| 
 | ||||
| debug = os.environ.get("DEPENDENCY_INJECTOR_DEBUG_MODE") == "1" | ||||
| limited_api = os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1" | ||||
| limited_api = ( | ||||
|     os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1" | ||||
|     and sys.implementation.name == "cpython" | ||||
| ) | ||||
| defined_macros = [] | ||||
| options = {} | ||||
| compiler_directives = { | ||||
|  | @ -31,7 +35,7 @@ if debug: | |||
| if limited_api: | ||||
|     options.setdefault("bdist_wheel", {}) | ||||
|     options["bdist_wheel"]["py_limited_api"] = "cp38" | ||||
|     defined_macros.append(("Py_LIMITED_API", 0x03080000)) | ||||
|     defined_macros.append(("Py_LIMITED_API", "0x03080000")) | ||||
| 
 | ||||
| setup( | ||||
|     options=options, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user