forked from mckib2/pygrappa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_cython.py
38 lines (30 loc) · 885 Bytes
/
setup_cython.py
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
30
31
32
33
34
35
36
37
38
'''Compile .pyx to .c*.
Notes
-----
Developers: to compile Cython files:
.. code-block:: python
python3 setup_cython.py build_ext --inplace
'''
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy as np
extensions = [
Extension(
'pygrappa.cgrappa',
['src/cgrappa.pyx', 'src/get_sampling_patterns.cpp'],
include_dirs=['src/', np.get_include()]),
Extension(
'pygrappa.grog_powers',
['src/grog_powers.pyx', 'src/_grog_powers_template.cpp'],
include_dirs=['src/', np.get_include()],
extra_compile_args=["-std=c++14"],
extra_link_args=["-std=c++14"]),
Extension(
'pygrappa.grog_gridding',
['src/grog_gridding.pyx'],
include_dirs=['src/', np.get_include()]),
]
setup(
ext_modules=cythonize(extensions),
)