-
Notifications
You must be signed in to change notification settings - Fork 448
/
setup.py
46 lines (38 loc) · 1.05 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
from setuptools import setup, Extension
import os
import numpy
extra_folders = [
"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(
"roboticstoolbox.frne",
sources=[
"./roboticstoolbox/core/vmath.c",
"./roboticstoolbox/core/ne.c",
"./roboticstoolbox/core/frne.c",
],
include_dirs=["./roboticstoolbox/core/"],
)
fknm = Extension(
"roboticstoolbox.fknm",
sources=[
"./roboticstoolbox/core/methods.cpp",
"./roboticstoolbox/core/ik.cpp",
"./roboticstoolbox/core/linalg.cpp",
"./roboticstoolbox/core/fknm.cpp",
],
include_dirs=["./roboticstoolbox/core/", numpy.get_include()],
)
setup(
ext_modules=[frne, fknm],
package_data={"roboticstoolbox": extra_files},
)