-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
19 lines (17 loc) · 871 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from distutils.core import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
from Cython.Distutils import build_ext
import numpy,os
#Options = "-unroll4 -mtune=native -march=native"
#os.environ["CC"] = "gcc " + Options
#os.environ["LDSHARED"] = "gcc -shared " + Options
setup(
cmdclass={'build_ext':build_ext},
ext_modules = [Extension("fft_cython",
sources=["fft_cython_py.pyx", "fft_cython_c.c"],
libraries = ["fftw3"],
extra_compile_args = ["-Ofast","-mtune=native","-unroll4","-march=native","-fopenmp","-pthread","-lpthread"],
extra_link_args = ["-lfftw3","-lfftw3_omp","-lm","-fopenmp","-pthread","-lpthread"],
library_dirs=['/usr/lib64'],
include_dirs=['/usr/lib64',numpy.get_include()])])