-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
29 lines (23 loc) · 707 Bytes
/
setup.py
File metadata and controls
29 lines (23 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Setup script for building Cython extensions."""
from setuptools import setup, Extension
import numpy
USE_CYTHON = True
ext = ".pyx" if USE_CYTHON else ".c"
extensions = [
Extension(
"mlfcs.thirdorder.thirdorder_core",
["src/mlfcs/thirdorder/thirdorder_core" + ext],
include_dirs=[numpy.get_include()],
),
Extension(
"mlfcs.fourthorder.fourthorder_core",
["src/mlfcs/fourthorder/fourthorder_core" + ext],
include_dirs=[numpy.get_include()],
),
]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions, language_level=3)
setup(ext_modules=extensions)