-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
83 lines (74 loc) · 2.56 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
"""Setup module for catkin_tools_fetch."""
import os
import sys
from stat import ST_MODE
from distutils import log
from setuptools import setup
from setuptools import find_packages
from setuptools.command.install import install
version_str = '0.3.5'
# Setup installation dependencies
install_requires = [
'catkin-pkg > 0.2.9',
'catkin_tools >= 0.4.2',
'mock',
'setuptools',
'termcolor'
]
if sys.version_info[0] == 2 and sys.version_info[1] <= 6:
install_requires.append('argparse')
# Figure out the resources that need to be installed
this_dir = os.path.abspath(os.path.dirname(__file__))
osx_resources_path = os.path.join(
this_dir,
'catkin_tools',
'notifications',
'resources',
'osx',
'catkin build.app')
class PermissiveInstall(install):
"""A class for permissive install."""
def run(self):
"""Run the install procedure."""
install.run(self)
if os.name == 'posix':
for file in self.get_outputs():
# all installed files should be readable for anybody
mode = ((os.stat(file)[ST_MODE]) | 0o444) & 0o7777
log.info("changing permissions of %s to %o" % (file, mode))
os.chmod(file, mode)
github_url = \
'https://github.com/Photogrammetry-Robotics-Bonn/catkin_tools_fetch'
setup(
name='catkin_tools_fetch',
packages=find_packages(exclude=['tests', 'docs']),
version=version_str,
install_requires=install_requires,
author='Igor Bogoslavskyi',
author_email='igor.bogoslavskyi@uni-bonn.de',
maintainer='Igor Bogoslavskyi',
maintainer_email='igor.bogoslavskyi@uni-bonn.de',
keywords=['catkin', 'catkin_tools'],
license="Apache 2.0",
url=github_url,
download_url=github_url + '/tarball/' + version_str,
classifiers=[
'Environment :: Console',
'Programming Language :: Python',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
],
description="""A new verb 'dependencies' to manage project dependencies with
catkin_tools""",
long_description="""Provides a new verb 'dependencies' or 'deps' for
catkin_tools. Allows fetching dependencies of the packages found inside the
catkin workspace and updating all the packages to the final state.""",
test_suite='tests',
entry_points={
'catkin_tools.commands.catkin.verbs': [
'deps = catkin_tools_fetch:description_deps',
'dependencies = catkin_tools_fetch:description_dependencies',
],
},
cmdclass={'install': PermissiveInstall},
)