|
63 | 63 | compiler_directives['linetrace'] = True |
64 | 64 |
|
65 | 65 |
|
66 | | -ext_modules = [ |
67 | | - Extension( |
68 | | - "flint._flint", ["src/flint/pyflint.pyx"], |
69 | | - libraries=libraries, |
70 | | - library_dirs=default_lib_dirs, |
71 | | - include_dirs=default_include_dirs, |
72 | | - define_macros=define_macros, |
73 | | - ), |
74 | | - Extension( |
75 | | - "flint.flint_base.flint_context", |
76 | | - ["src/flint/flint_base/flint_context.pyx"], |
77 | | - libraries=libraries, |
78 | | - library_dirs=default_lib_dirs, |
79 | | - include_dirs=default_include_dirs, |
80 | | - define_macros=define_macros, |
81 | | - ), |
| 66 | +ext_files = [ |
| 67 | + ("flint._flint", ["src/flint/pyflint.pyx"]), # Main Module |
| 68 | + # Submodules |
| 69 | + ("flint.flint_base.flint_context", ["src/flint/flint_base/flint_context.pyx"]), |
82 | 70 | ] |
83 | 71 |
|
| 72 | +ext_options = { |
| 73 | + "libraries" : libraries, |
| 74 | + "library_dirs" : default_lib_dirs, |
| 75 | + "include_dirs" : default_include_dirs, |
| 76 | + "define_macros" : define_macros, |
| 77 | +} |
| 78 | + |
| 79 | +ext_modules = [] |
| 80 | +for mod_name, src_files in ext_files: |
| 81 | + ext = Extension(mod_name, src_files, **ext_options) |
| 82 | + ext_modules.append(ext) |
| 83 | + |
84 | 84 | for e in ext_modules: |
85 | 85 | e.cython_directives = {"embedsignature": True} |
86 | 86 |
|
|
0 commit comments