forked from BerkeleyAutomation/python-fcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
86 lines (75 loc) · 2.59 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import os
import sys
import inspect
from setuptools import Extension, setup
# get current directory of file in case someone
# called setup.py from elsewhere
cwd = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
# load __version__
exec(open(os.path.join(cwd,
'fcl/version.py'), 'r').read())
platform_supported = False
for prefix in ['darwin', 'linux', 'bsd']:
if prefix in sys.platform:
platform_supported = True
include_dirs = ['/usr/include',
'/usr/local/include',
'/usr/include/eigen3']
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(':')
try:
# get the numpy include path from numpy
import numpy
include_dirs.append(numpy.get_include())
except:
pass
break
if sys.platform == "win32":
platform_supported = False
if not platform_supported:
raise NotImplementedError(sys.platform)
setup(
name='python-fcl',
version=__version__,
description='Python bindings for the Flexible Collision Library',
long_description='Python bindings for the Flexible Collision Library',
url='https://github.com/BerkeleyAutomation/python-fcl',
author='Matthew Matl',
author_email='mmatl@eecs.berkeley.edu',
license = "BSD",
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords='fcl collision distance',
packages=['fcl'],
setup_requires=['cython'],
install_requires=['numpy', 'cython'],
ext_modules=[Extension(
"fcl.fcl",
["fcl/fcl.pyx"],
include_dirs = include_dirs,
library_dirs = lib_dirs,
libraries=[
"fcl","octomap"
],
language="c++",
extra_compile_args = ["-std=c++11"]
)]
)