forked from neka-nat/python-octomap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (42 loc) · 1.15 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
import os
import sys
from distutils.core import Extension, setup
from Cython.Distutils import build_ext
platform_supported = False
for prefix in ['darwin', 'linux', 'bsd']:
if prefix in sys.platform:
platform_supported = True
include_dirs = [
'/usr/include',
'/usr/local/include',
]
lib_dirs = [
'/usr/lib',
'/usr/local/lib',
]
if 'CPATH' in os.environ:
include_dirs += os.environ['CPATH'].split(':')
if 'LD_LIBRARY_PATH' in os.environ:
lib_dirs += os.environ['LD_LIBRARY_PATH'].split(':')
break
if sys.platform == "win32":
platform_supported = False
if not platform_supported:
raise NotImplementedError(sys.platform)
setup(
name="octomap",
version="0.4",
license = "BSD",
packages=["octomap"],
ext_modules=[Extension(
"octomap",
["octomap/octomap.pyx"],
include_dirs = include_dirs,
library_dirs = lib_dirs,
libraries=[
"octomap",
"octomath"
],
language="c++")],
cmdclass={'build_ext': build_ext},
)