forked from rec/gpu_fft_py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
36 lines (31 loc) · 976 Bytes
/
setup.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
import sys
from Cython.Distutils import build_ext
from distutils.core import setup
from distutils.extension import Extension
if 'clean' in sys.argv:
print('Deleting cython files...')
import subprocess
subprocess.Popen('rm -rf build', shell=True, executable='/bin/bash')
subprocess.Popen('rm -rf *.c', shell=True, executable='/bin/bash')
subprocess.Popen('rm -rf *.so', shell=True, executable='/bin/bash')
setup(
cmdclass = {'build_ext': build_ext},
ext_modules = [
Extension(
'gpu_fft_py',
sources=[
'gpu_fft_py.pyx',
'gpu_fft/gpu_fft_base.c',
'gpu_fft/gpu_fft.c',
'gpu_fft/gpu_fft_shaders.c',
'gpu_fft/gpu_fft_twiddles.c',
'gpu_fft/gpu_fft_trans.c',
'gpu_fft/mailbox.c',
],
extra_compile_args=['-Igpu_fft'],
extra_link_args=['-lrt', '-lm'],
)
]
)
# ext_modules = cythonize('gpu_fft.pyx',
# extra_link_args='-Lgpu_fft -lgpufft')