-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
46 lines (41 loc) · 1.48 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
from setuptools import find_packages, setup
package_name = 'ros2_qualisys_cf'
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
]
def package_files(data_files, directory_list):
paths_dict = {}
for directory in directory_list:
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
file_path = os.path.join(path, filename)
install_path = os.path.join('share', package_name, path)
if install_path in paths_dict.keys():
paths_dict[install_path].append(file_path)
else:
paths_dict[install_path] = [file_path]
for key in paths_dict.keys():
data_files.append((key, paths_dict[key]))
return data_files
setup(
name=package_name,
version='0.0.0',
packages=find_packages(exclude=['test']),
data_files=package_files(data_files, ['launch/']),
install_requires=['setuptools'],
zip_safe=True,
maintainer='kap',
maintainer_email='kpant14@gmail.com',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'qualisys_cf_solo = ros2_qualisys_cf.qualisys_cf_solo:main',
'qualisys_cf_multi = ros2_qualisys_cf.qualisys_cf_multi:main',
],
},
)