forked from shankarsivarajan/CubeSurfer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup64.py
25 lines (22 loc) · 881 Bytes
/
setup64.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
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import Cython.Compiler.Options
Cython.Compiler.Options.annotate = True
from sys import platform
if platform == "linux" or platform == "linux2":
ext_modules = [Extension("mciso", ["mciso.pyx"],
extra_compile_args=['-O2', '-fopenmp', '-ffast-math'],
extra_link_args=['-fopenmp'])]
elif platform == "darwin":
ext_modules = [Extension("mciso", ['mciso' + '.pyx'],
extra_compile_args=['-march=x86-64', '-msse4.2', '-O3', '-ffast-math', '-fopenmp'],
extra_link_args=['-fopenmp', '-static', '-lm'] )]
elif platform == "win32":
ext_modules = [Extension("mciso", ["mciso.pyx"],
extra_compile_args=['/O2', '/openmp', '/fp:fast'])]
setup(
name = 'CubeSurfer core script',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)