diff --git a/setup.py b/setup.py index 5bd2454..b6071e6 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,16 @@ from distutils.core import setup from distutils.extension import Extension 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( name = "pep.pyx modules", - ext_modules = cythonize([ - Extension("helpers.packetHelper", ["helpers/packetHelper.pyx"]), - ], - nthreads = 4), + ext_modules = cythonize(cythonExt, nthreads = 4), ) \ No newline at end of file