forked from petercorke/robotics-toolbox-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
150 lines (133 loc) · 4.53 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
from setuptools import setup, find_packages, Extension
import os
# fmt: off
import pip
pip.main(['install', 'numpy>=1.17.4'])
import numpy
# fmt: on
here = os.path.abspath(os.path.dirname(__file__))
req = [
"numpy>=1.17.4",
"spatialmath-python~=1.0.0",
"spatialgeometry~=1.0.0",
"pgraph-python",
"scipy",
"matplotlib",
"ansitable",
"swift-sim~=1.0.0",
"rtb-data",
"progress",
]
collision_req = ["pybullet"]
vp_req = ["vpython", "numpy-stl", "imageio", "imageio-ffmpeg"]
dev_req = ["pytest", "pytest-cov", "flake8", "pyyaml", "sympy"]
docs_req = [
"sphinx",
"sphinx_rtd_theme",
"sphinx-autorun",
]
# Get the long description from the README file
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# list all data folders here, to ensure they get packaged
extra_folders = [
# 'roboticstoolbox/models/URDF/xacro',
# 'roboticstoolbox/models/DH/meshes',
# 'roboticstoolbox/data',
"roboticstoolbox/core",
]
def package_files(directory):
paths = []
for (pathhere, _, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", pathhere, filename))
return paths
extra_files = []
for extra_folder in extra_folders:
extra_files += package_files(extra_folder)
frne = Extension(
"frne",
sources=[
"./roboticstoolbox/core/vmath.c",
"./roboticstoolbox/core/ne.c",
"./roboticstoolbox/core/frne.c",
],
include_dirs=["./roboticstoolbox/core/"],
)
# eig = "./roboticstoolbox/core/Eigen"
fknm = Extension(
"fknm",
sources=[
"./roboticstoolbox/core/methods.cpp",
"./roboticstoolbox/core/linalg.cpp",
"./roboticstoolbox/core/fknm.cpp",
],
include_dirs=["./roboticstoolbox/core/", numpy.get_include()],
# define_macros=[("EIGEN_USE_MKL_ALL", "1")],
# extra_compile_args=["-Werror"],
# extra_compile_args=["-fopenmp"],
# extra_compile_args=["-Ofast"],
# extra_link_args=["-lgomp"],
# extra_compile_args=["-I/opt/intel/oneapi/mkl/2022.0.2/include"],
# extra_link_args=[
# "-L/opt/intel/oneapi/mkl/2022.0.2/lib/intel64 -lmkl_rt -Wl,--no-as-needed -lpthread -lm -ldl"
# ],
)
setup(
name="roboticstoolbox-python",
version="1.0.1",
description="A Python library for robotic education and research",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/petercorke/robotics-toolbox-python",
author="Jesse Haviland and Peter Corke",
license="MIT",
classifiers=[
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 5 - Production/Stable",
# Indicate who your project is intended for
"Intended Audience :: Developers",
# Pick your license as you wish (should match "license" above)
"License :: OSI Approved :: MIT License",
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
python_requires=">=3.6",
project_urls={
"Documentation": "https://petercorke.github.io/roboticstoolbox-python",
"Source": "https://github.com/petercorke/roboticstoolbox-python",
"Tracker": "https://github.com/petercorke/roboticstoolbox-python/issues",
"Coverage": "https://codecov.io/gh/petercorke/roboticstoolbox-python",
},
# cmdclass={"build_ext": build_ext_subclass},
ext_modules=[frne, fknm],
keywords="python robotics robotics-toolbox kinematics dynamics"
" motion-planning trajectory-generation jacobian hessian"
" control simulation robot-manipulator mobile-robot",
packages=find_packages(exclude=["tests", "notebooks"]),
package_data={"roboticstoolbox": extra_files},
scripts=[
"roboticstoolbox/bin/rtbtool",
],
entry_points={
"console_scripts": [
"eigdemo=roboticstoolbox.examples.eigdemo:main",
"tripleangledemo=roboticstoolbox.examples.tripleangledemo:main",
"twistdemo=roboticstoolbox.examples.twistdemo:main",
]
},
install_requires=req,
extras_require={
"collision": collision_req,
"dev": dev_req,
"docs": docs_req,
"vpython": vp_req,
},
)