forked from vioshyvo/mrpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
40 lines (37 loc) · 1.06 KB
/
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
37
38
39
40
#!/usr/bin/python
import setuptools
import numpy
from setuptools import Extension
# Not all CPUs have march as a tuning parameter
import platform
cputune, libraries, llvm = ['-march=native'], [], []
if platform.machine() == 'ppc64le':
cputune = ['-mcpu=native']
if platform.system() == 'Darwin':
llvm += ['-L/usr/local/opt/llvm/lib']
if platform.system() == 'Windows':
libraries = []
else:
libraries = ['stdc++']
setuptools.setup(
name='mrpt',
version='0.1',
url='https://github.com/teemupitkanen/mrpt',
install_requires=[],
packages={'.': 'mrpt'},
zip_safe=False,
test_suite='py.test',
entry_points='',
ext_modules=[
Extension('mrptlib',
sources=[
'cpp/mrptmodule.cpp',
],
extra_compile_args=['-std=c++11', '-O3', '-ffast-math', '-s',
'-fno-rtti', '-fopenmp', '-DNDEBUG'] + cputune,
libraries=libraries,
extra_link_args=['-lgomp'] + llvm,
include_dirs=['cpp/lib', numpy.get_include()]
)
]
)