-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
67 lines (58 loc) · 2.04 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import os
from setuptools import find_packages
from setuptools import setup
# get version number from module
version_file = os.path.join(
os.path.dirname(__file__), 'docker_templates', '_version.py')
exec(open(version_file).read())
# Get a list of scripts to install
scripts = []
for root, dirnames, filenames in os.walk('scripts'):
# don't install the wrapper scripts
# since they would overlay Python packages with the same name
if 'wrapper' in dirnames:
dirnames.remove('wrapper')
for filename in filenames:
if not filename.endswith('.py'):
continue
scripts.append(os.path.join(root, filename))
# Get the long description out of the readme.md
with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
long_description = f.read()
install_requires = [
'empy',
'pyyaml',
'rosdistro',
'ros_buildfarm',
]
kwargs = {
'name': 'docker_templates',
'version': __version__,
'packages': find_packages(exclude=['test']),
'scripts': scripts,
'include_package_data': True,
'zip_safe': False,
'package_dir': {'docker_templates': 'docker_templates'},
'package_data': {'docker_templates': ['templates/docker_images/*.em']},
'install_requires': install_requires,
'author': 'Tully Foote',
'author_email': '[email protected]',
'maintainer': 'Tully Foote',
'maintainer_email': '[email protected]',
'url': 'https://github.com/osrf/docker_templates',
'keywords': ['ROS', 'Gazebo', 'docker'],
'classifiers': [
'Programming Language :: Python',
'License :: OSI Approved :: Apache Software License'],
'description': "A package to generate Docker Base Images.",
'long_description': long_description,
'license': 'Apache 2.0',
}
if 'SKIP_PYTHON_MODULES' in os.environ:
kwargs['packages'] = []
elif 'SKIP_PYTHON_SCRIPTS' in os.environ:
kwargs['name'] += '_modules'
kwargs['scripts'] = []
# else:
# kwargs['install_requires'] += ['catkin_pkg >= 0.2.6', 'rosdistro >= 0.4.0']
setup(**kwargs)