-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathsetup.py
53 lines (43 loc) · 1.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
from setuptools import find_packages, setup
import os
if os.environ.get('ROS_VERSION') == "1":
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['pycram'],
package_dir={'': 'src'}
)
setup(**setup_args)
elif os.environ.get('ROS_VERSION') == "2":
package_name = 'pycram'
# Iterate through all the files and subdirectories
# to build the data files array
def generate_data_files(share_path, dir):
data_files = []
for path, _, files in os.walk(dir):
list_entry = (share_path + path, [os.path.join(path, f) for f in files if not f.startswith('.')])
data_files.append(list_entry)
return data_files
setup(
name=package_name,
version='0.0.2',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
] + generate_data_files('share/' + package_name + '/', 'resources'),
install_requires=['setuptools'],
zip_safe=True,
maintainer='Jonas Dech',
maintainer_email='[email protected]',
description='A Python library for cognitive robot control',
license='Gplv3',
tests_require=['pytest'],
entry_points={
'console_scripts': [
],
},
)