Skip to content

Commit

Permalink
add alias for Pop! OS (#757)
Browse files Browse the repository at this point in the history
* add alias for Pop! OS

Signed-off-by: Mikael Arguedas <[email protected]>
  • Loading branch information
mikaelarguedas authored Aug 13, 2020
1 parent d1784da commit 2667916
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'version': '0.19.0',
'packages': ['rosdep2', 'rosdep2.ament_packages', 'rosdep2.platforms'],
'package_dir': {'': 'src'},
'install_requires': ['catkin_pkg >= 0.4.0', 'rospkg >= 1.1.10', 'rosdistro >= 0.7.5', 'PyYAML >= 3.1'],
'install_requires': ['catkin_pkg >= 0.4.0', 'rospkg >= 1.2.7', 'rosdistro >= 0.7.5', 'PyYAML >= 3.1'],
'test_suite': 'nose.collector',
'test_requires': ['mock', 'nose >= 1.0'],
'author': 'Tully Foote, Ken Conley',
Expand Down
23 changes: 21 additions & 2 deletions src/rosdep2/platforms/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,16 @@
import subprocess
import sys

from rospkg.os_detect import OS_DEBIAN, OS_LINARO, OS_UBUNTU, OS_ELEMENTARY, OS_MX, OsDetect, read_os_release

from rospkg.os_detect import (
OS_DEBIAN,
OS_LINARO,
OS_UBUNTU,
OS_ELEMENTARY,
OS_MX,
OS_POP,
OsDetect,
read_os_release
)
from .pip import PIP_INSTALLER
from .gem import GEM_INSTALLER
from .source import SOURCE_INSTALLER
Expand All @@ -55,6 +63,7 @@ def register_platforms(context):
register_elementary(context)
register_linaro(context)
register_mx(context)
register_pop(context)


def register_debian(context):
Expand Down Expand Up @@ -98,6 +107,16 @@ def register_mx(context):
context.set_os_override(OS_DEBIAN, version[version.find("(") + 1:version.find(")")])


def register_pop(context):
# Pop! OS is an alias for Ubuntu. If Pop! is detected and it's
# not set as an override force ubuntu.
(os_name, os_version) = context.get_os_name_and_version()
if os_name == OS_POP and not context.os_override:
print('rosdep detected OS: [%s] aliasing it to: [%s]' %
(OS_POP, OS_UBUNTU), file=sys.stderr)
context.set_os_override(OS_UBUNTU, context.os_detect.get_codename())


def register_ubuntu(context):
context.add_os_installer_key(OS_UBUNTU, APT_INSTALLER)
context.add_os_installer_key(OS_UBUNTU, PIP_INSTALLER)
Expand Down
2 changes: 1 addition & 1 deletion src/rosdep2/platforms/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def handle_options(options):

# make sure options is a list of list of strings
try:
valid = all([isinstance(x, _basestring) for l in options for x in l])
valid = all([isinstance(x, _basestring) for option in options for x in option])
except Exception as e:
raise InvalidData("Invalid list of options '%s', error: %s" % (options, e))
else:
Expand Down
4 changes: 2 additions & 2 deletions stdeb.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ X-Python3-Version: >= 3.4
Setup-Env-Vars: SKIP_PYTHON_MODULES=1

[rosdep_modules]
Depends: ca-certificates, python-rospkg-modules (>= 1.1.10), python-yaml, python-catkin-pkg-modules (>= 0.4.0), python-rosdistro-modules (>= 0.7.5), sudo
Depends3: ca-certificates, python3-rospkg-modules (>= 1.1.10), python3-yaml, python3-catkin-pkg-modules (>= 0.4.0), python3-rosdistro-modules (>= 0.7.5), sudo
Depends: ca-certificates, python-rospkg-modules (>= 1.2.7), python-yaml, python-catkin-pkg-modules (>= 0.4.0), python-rosdistro-modules (>= 0.7.5), sudo
Depends3: ca-certificates, python3-rospkg-modules (>= 1.2.7), python3-yaml, python3-catkin-pkg-modules (>= 0.4.0), python3-rosdistro-modules (>= 0.7.5), sudo
Conflicts: python-rosdep (<< 0.18.0), python-rosdep2
Conflicts3: python3-rosdep (<< 0.18.0), python3-rosdep2
Replaces: python-rosdep (<< 0.18.0)
Expand Down

0 comments on commit 2667916

Please sign in to comment.