.BANCHO. Dynamic setup.py file
This commit is contained in:
		
							
								
								
									
										13
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								setup.py
									
									
									
									
									
								
							@@ -2,11 +2,16 @@
 | 
				
			|||||||
from distutils.core import setup
 | 
					from distutils.core import setup
 | 
				
			||||||
from distutils.extension import Extension
 | 
					from distutils.extension import Extension
 | 
				
			||||||
from Cython.Build import cythonize
 | 
					from Cython.Build import cythonize
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cythonExt = []
 | 
				
			||||||
 | 
					for root, dirs, files in os.walk(os.getcwd()):
 | 
				
			||||||
 | 
						for file in files:
 | 
				
			||||||
 | 
							if file.endswith(".pyx"):
 | 
				
			||||||
 | 
								filePath = os.path.relpath(os.path.join(root, file))
 | 
				
			||||||
 | 
								cythonExt.append(Extension(filePath.replace("/", ".")[:-4], [filePath]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
setup(
 | 
					setup(
 | 
				
			||||||
    name = "pep.pyx modules",
 | 
					    name = "pep.pyx modules",
 | 
				
			||||||
    ext_modules = cythonize([
 | 
					    ext_modules = cythonize(cythonExt, nthreads = 4),
 | 
				
			||||||
        Extension("helpers.packetHelper", ["helpers/packetHelper.pyx"]),
 | 
					 | 
				
			||||||
    ],
 | 
					 | 
				
			||||||
    nthreads = 4),
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
		Reference in New Issue
	
	Block a user