forked from sunava/pycram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
55 lines (45 loc) · 1.7 KB
/
setup.py
File metadata and controls
55 lines (45 loc) · 1.7 KB
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
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'], include=['pycram', 'pycrap']),
package_dir={"": "src"}, # Optional
packages=["pycram", "pycrap"],
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='jdech@uni-bremen.de',
description='A Python library for cognitive robot control',
license='Gplv3',
tests_require=['pytest'],
entry_points={
'console_scripts': [
],
},
)