forked from tormach/hw_device_mgr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
49 lines (45 loc) · 1.12 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
#!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
dev_data_dir = "src/hw_device_mgr/devices"
# Packages like hw_device_mgr.{pkg}.tests.bogus_devices
pkgs_bd = [
"cia_301",
"cia_402",
"errors",
"ethercat",
"hal",
"lcec",
"mgr",
"mgr_hal",
"mgr_ros",
]
# Packages like hw_device_mgr.{pkg}.tests
pkgs_t = ["devices", "mgr_ros_hal"] + pkgs_bd
# Generate lists
packages = (
[
"hw_device_mgr",
"hw_device_mgr.tests",
"hw_device_mgr.tests.bogus_devices",
]
+ [f"hw_device_mgr.{p}" for p in pkgs_t]
+ [f"hw_device_mgr.{p}.tests" for p in pkgs_t]
+ [f"hw_device_mgr.{p}.tests.bogus_devices" for p in pkgs_bd]
)
d = generate_distutils_setup(
packages=packages,
package_dir={"": "src"},
package_data={
"": [ # Within any package, install:
# ESI files
"device_xml/*.xml",
# Error descriptions
"device_err/*.yaml",
# Test configs
"tests/*.yaml",
"bogus_devices/*.yaml",
],
},
)
setup(**d)