Skip to content

Commit 618583a

Browse files
authored
Merge branch 'master' into pip_version
2 parents 4514b4d + fbeb43a commit 618583a

File tree

28 files changed

+809
-117
lines changed

28 files changed

+809
-117
lines changed

.travis/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ do_install()
55
set -e
66

77
if [[ $TRAVIS_OS_NAME == 'osx' && $PYTHON_INSTALLER == 'pyenv' ]]; then
8+
brew update
89
brew install pyenv-virtualenv
910
pyenv versions
1011
eval "$(pyenv init -)"

CHANGELOG.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
0.18.0 (2019-11-20)
2+
-------------------
3+
- split -modules into separate Debian package
4+
- https://github.com/ros-infrastructure/rosdep/pull/731
5+
- fix macOS CI
6+
- https://github.com/ros-infrastructure/rosdep/pull/730
7+
8+
0.17.0 (2019-10-18)
9+
-------------------
10+
- Fix TypeError on ROS Kinetic.
11+
- https://github.com/ros-infrastructure/rosdep/issues/721
12+
- Pip installer uses ROS_PYTHON_VERSION
13+
- https://github.com/ros-infrastructure/rosdep/issues/709
14+
15+
0.16.2 (2019-10-18)
16+
-------------------
17+
- Bump rospkg dependency to guarantee all platforms are available..
18+
- https://github.com/ros-infrastructure/rosdep/issues/717
19+
- Set ROS_PYTHON_VERSION if unset.
20+
- https://github.com/ros-infrastructure/rosdep/issues/708
21+
22+
0.16.1 (2019-09-19)
23+
-------------------
24+
25+
- Fix problem with release uploaded to PyPI.
26+
- https://github.com/ros-infrastructure/rosdep/issues/705
27+
28+
0.16.0 (2019-09-19)
29+
-------------------
30+
- Add support for Nix/NixOS.
31+
- https://github.com/ros-infrastructure/rosdep/pull/697
32+
- Update supported platforms.
33+
- Dropped platforms older than Xenial.
34+
- Added Ubuntu Cosmic, Disco, and Eoan.
35+
- https://github.com/ros-infrastructure/rosdep/pull/700
36+
- Add sudo dependency in debian packages.
37+
- https://github.com/ros-infrastructure/rosdep/pull/680
38+
- Improve support for AMENT_PREFIX_PATH used in ROS 2.
39+
- https://github.com/ros-infrastructure/rosdep/pull/699
40+
- Add support for the --ignore-src argument for the keys verb.
41+
- https://github.com/ros-infrastructure/rosdep/pull/686
42+
143
0.15.2 (2019-05-17)
244
-------------------
345
- Migrate to yaml.safe_load to avoid yaml.load vulnerabilities.

setup.py

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
import os
22
from setuptools import setup
33

4-
exec(open(os.path.join(os.path.dirname(__file__), 'src', 'rosdep2', '_version.py')).read())
5-
6-
setup(
7-
name='rosdep',
8-
version=__version__, # noqa:F821
9-
packages=['rosdep2', 'rosdep2.platforms'],
10-
package_dir={'': 'src'},
11-
install_requires=['catkin_pkg >= 0.4.0', 'rospkg >= 1.1.8', 'rosdistro >= 0.7.0', 'PyYAML >= 3.1'],
12-
test_suite='nose.collector',
13-
test_requires=['mock', 'nose >= 1.0'],
14-
scripts=['scripts/rosdep', 'scripts/rosdep-source'],
15-
author='Tully Foote, Ken Conley',
16-
author_email='[email protected]',
17-
url='http://wiki.ros.org/rosdep',
18-
keywords=['ROS'],
19-
classifiers=[
4+
kwargs = {
5+
'name': 'rosdep',
6+
# same version as in:
7+
# - src/rosdep2/__init__.py
8+
# - stdeb.cfg
9+
'version': '0.18.0',
10+
'packages': ['rosdep2', 'rosdep2.ament_packages', 'rosdep2.platforms'],
11+
'package_dir': {'': 'src'},
12+
'install_requires': ['catkin_pkg >= 0.4.0', 'rospkg >= 1.1.10', 'rosdistro >= 0.7.5', 'PyYAML >= 3.1'],
13+
'test_suite': 'nose.collector',
14+
'test_requires': ['mock', 'nose >= 1.0'],
15+
'scripts': ['scripts/rosdep', 'scripts/rosdep-source'],
16+
'author': 'Tully Foote, Ken Conley',
17+
'author_email': '[email protected]',
18+
'url': 'http://wiki.ros.org/rosdep',
19+
'keywords': ['ROS'],
20+
'classifiers': [
2021
'Programming Language :: Python',
2122
'License :: OSI Approved :: BSD License'],
22-
description='rosdep package manager abstraction tool for ROS',
23-
long_description='Command-line tool for installing system '
24-
'dependencies on a variety of platforms.',
25-
license='BSD'
26-
)
23+
'description': 'rosdep package manager abstraction tool for ROS',
24+
'long_description': 'Command-line tool for installing system '
25+
'dependencies on a variety of platforms.',
26+
'license': 'BSD',
27+
}
28+
if 'SKIP_PYTHON_MODULES' in os.environ:
29+
kwargs['packages'] = []
30+
kwargs['package_dir'] = {}
31+
if 'SKIP_PYTHON_SCRIPTS' in os.environ:
32+
kwargs['name'] += '_modules'
33+
kwargs['scripts'] = {}
34+
35+
setup(**kwargs)

src/rosdep2/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def create_default_installer_context(verbose=False):
5959
from .platforms import arch
6060
from .platforms import cygwin
6161
from .platforms import debian
62-
from .platforms import openembedded
6362
from .platforms import gentoo
63+
from .platforms import nix
64+
from .platforms import openembedded
6465
from .platforms import opensuse
6566
from .platforms import osx
6667
from .platforms import pip
@@ -70,7 +71,7 @@ def create_default_installer_context(verbose=False):
7071
from .platforms import slackware
7172
from .platforms import source
7273

73-
platform_mods = [alpine, arch, cygwin, debian, gentoo, openembedded, opensuse, osx, redhat, slackware, freebsd]
74+
platform_mods = [alpine, arch, cygwin, debian, gentoo, nix, openembedded, opensuse, osx, redhat, slackware, freebsd]
7475
installer_mods = [source, pip, gem] + platform_mods
7576

7677
context = InstallerContext()

src/rosdep2/_version.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
__version__ = '0.15.2'
1+
# same version as in:
2+
# - setup.py
3+
# - stdeb.cfg
4+
__version__ = '0.18.0'

src/rosdep2/ament_packages/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Code within is folder is essentially copied directly from the `ament_package` repo, or more specificity the `ament_index_python` package. See original source here:
2+
3+
https://github.com/ament/ament_index/tree/86f5a6712690830fe3e19752f70cfcdb00a3d223/ament_index_python/ament_index_python
4+
5+
TODO: reconcile duplicate code via shared codebase
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2015 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from .constants import AMENT_PREFIX_PATH_ENV_VAR
16+
from .constants import RESOURCE_INDEX_SUBFOLDER
17+
from .packages import get_packages_with_prefixes
18+
from .resources import get_resources
19+
from .search_paths import get_search_paths
20+
21+
__all__ = [
22+
'get_packages_with_prefixes',
23+
'get_resources',
24+
'get_search_paths',
25+
'AMENT_PREFIX_PATH_ENV_VAR',
26+
'RESOURCE_INDEX_SUBFOLDER',
27+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2015 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
RESOURCE_INDEX_SUBFOLDER = 'share/ament_index/resource_index'
17+
AMENT_PREFIX_PATH_ENV_VAR = 'AMENT_PREFIX_PATH'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2017 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import os
16+
17+
from .resources import get_resources
18+
19+
20+
def get_packages_with_prefixes():
21+
"""
22+
Return a dict of package names to the prefixes in which they are found.
23+
24+
:returns: dict of package names to their prefixes
25+
:rtype: dict
26+
"""
27+
return get_resources('packages')
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2015 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import os
16+
17+
from .constants import RESOURCE_INDEX_SUBFOLDER
18+
19+
from .search_paths import get_search_paths
20+
21+
22+
def get_resources(resource_type):
23+
"""
24+
Get the resource names of all resources of the specified type.
25+
26+
:param resource_type: the type of the resource
27+
:type resource_type: str
28+
:returns: dict of resource names to the prefix path they are in
29+
:raises: :exc:`EnvironmentError`
30+
"""
31+
assert resource_type, 'The resource type must not be empty'
32+
resources = {}
33+
for path in get_search_paths():
34+
resource_path = os.path.join(path, RESOURCE_INDEX_SUBFOLDER, resource_type)
35+
if os.path.isdir(resource_path):
36+
for resource in os.listdir(resource_path):
37+
# Ignore subdirectories, and anything starting with a dot
38+
if os.path.isdir(os.path.join(resource_path, resource)) \
39+
or resource.startswith('.'):
40+
continue
41+
if resource not in resources:
42+
resources[resource] = path
43+
return resources

0 commit comments

Comments
 (0)