-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
64 lines (53 loc) · 2.01 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from setuptools import setup, Extension, find_packages
from Cython.Build import cythonize
import numpy
import os
from os import path
from warnings import warn
MOTIVE_INC_DIR = path.join(r"C:\\", "Program Files", "OptiTrack", "Motive", "inc")
MOTIVE_LIB_DIR = path.join(r"C:\\", "Program Files", "OptiTrack", "Motive", "lib")
MOTIVE_LINK_ARG="/DEFAULTLIB:NPTrackingToolsx64"
#TODO: Link to correct path automatically
if not os.path.exists(MOTIVE_INC_DIR):
raise IOError("Can't find path {0}. Continuing installation, but please ensure Motive 64bit files are there before running.".format(MOTIVE_INC_DIR))
native = Extension(
'motive.native',
sources=[path.join("motive", "native.pyx")],
include_dirs=[MOTIVE_INC_DIR, "src"],
library_dirs=[MOTIVE_LIB_DIR ],
extra_link_args=[MOTIVE_LINK_ARG],
language="c++"
)
camera = Extension(
'motive.camera',
sources=[path.join("motive", "camera.pyx")],
include_dirs=[MOTIVE_INC_DIR, "src", numpy.get_include()],
library_dirs=[MOTIVE_LIB_DIR ],
extra_link_args=[MOTIVE_LINK_ARG],
language="c++"
)
rigidbody = Extension(
'motive.rigidbody',
sources=[path.join("motive", "rigidbody.pyx")],
include_dirs=[MOTIVE_INC_DIR, "src"],
library_dirs=[MOTIVE_LIB_DIR ],
extra_link_args=[MOTIVE_LINK_ARG],
language="c++"
)
# pointcloudgroup = Extension(
# 'motive.pointcloudgroup',
# sources=["src\\pointcloudgroup.pyx" ],
# include_dirs=[MOTIVE_INC_DIR, "src"],
# library_dirs=[MOTIVE_LIB_DIR ],
# extra_link_args=[MOTIVE_LINK_ARG],
# language="c++"
# )
transformations = Extension('_transformations', sources=['third_party/transformations.c'], include_dirs=[numpy.get_include()])
setup(
name="motive",
ext_modules= cythonize([native, rigidbody, camera, transformations]), # pointcloudgroup
packages= find_packages(),
scripts=['scripts/vislight.py', 'scripts/viewer.py', 'scripts/video.py'],
install_requires=['cython', 'appdirs', 'numpy', 'pyqtgraph'], #, 'btk' ],
package_data= {'': ['data/*.ttp']}
)