forked from andre-martins/AD3
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
48 lines (42 loc) · 1.32 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
41
42
43
44
45
46
47
48
from setuptools import setup
from setuptools.command.bdist_egg import bdist_egg
from setuptools.extension import Extension
libad3 = ('ad3', {
'sources': ['ad3/FactorGraph.cpp',
'ad3/GenericFactor.cpp',
'ad3/Factor.cpp',
'ad3/Utils.cpp'],
'include_dirs': ['.',
'./ad3',
'./Eigen'
],
'extra_compile_args': [
'-Wno-sign-compare',
'-Wall',
'-fPIC',
'-O3',
'-c',
'-fmessage-length=0'
],
})
# this is a backport of a workaround for a problem in distutils.
# install_lib doesn't call build_clib
class bdist_egg_fix(bdist_egg):
def run(self):
self.call_command('build_clib')
bdist_egg.run(self)
setup(name='ad3',
version="2.0.1",
author="Andre Martins",
url="http://www.ark.cs.cmu.edu/AD3",
author_email="[email protected]",
package_dir={'ad3': 'python/ad3'},
packages=['ad3'],
libraries=[libad3],
cmdclass={'bdist_egg': bdist_egg_fix},
#cmdclass={'build_ext': build_ext},
ext_modules=[Extension("ad3.factor_graph",
["python/factor_graph.cpp"],
include_dirs=["ad3"],
language="c++",
)])