How to use the rosdep.base_rosdep.RosdepBaseOS function in rosdep

To help you get started, we’ve selected a few rosdep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ros / ros / tools / rosdep / src / rosdep / debian.py View on Github external
import roslib.os_detect
import os 
import shutil
import urllib
import tarfile
import tempfile
import yaml

import rosdep.base_rosdep
import rosdep.core
import rosdep.installers

###### DEBIAN SPECIALIZATION #########################

###### Rosdep Test OS #########################
class RosdepTestOS(rosdep.base_rosdep.RosdepBaseOS):
    def __init__(self):
        self.name = "uninitialized"
        self.installers = {}

    def check_presence(self):
        if "ROSDEP_TEST_OS" in os.environ:
            return True
        return False

    def get_name(self):
        return os.environ.get("ROSDEP_TEST_OS", "rosdep_test_os")

    def get_version(self):
        return os.environ.get("ROSDEP_TEST_VERSION", "rosdep_test_version")
    
    def strip_detected_packages(self, packages):
github ros / ros / tools / rosdep / src / rosdep / debian.py View on Github external
def strip_detected_packages(self, packages):
        return packages

    def generate_package_install_command(self, packages, default_yes):
        if default_yes:
            return "#yes"
        else:
            return "#no"





###### Debian SPECIALIZATION #########################
class Debian(roslib.os_detect.Debian, rosdep.base_rosdep.RosdepBaseOS):
    """ This is an implementation of a standard interface for
    interacting with rosdep.  This defines all Ubuntu sepecific
    methods, including detecting the OS/Version number.  As well as
    how to check for and install packages."""
    def __init__(self):
        self.installers = {}
        self.installers['apt'] = rosdep.installers.AptInstaller
        self.installers['pip'] = rosdep.installers.PipInstaller
        self.installers['source'] = rosdep.installers.SourceInstaller
        self.installers['default'] = rosdep.installers.AptInstaller

    
    pass
###### END Debian SPECIALIZATION ########################

###### UBUNTU SPECIALIZATION #########################
github ros / ros / tools / rosdep / src / rosdep / redhat.py View on Github external
return "#Packages\nsudo yum -y install " + ' '.join(packages)
        else:
            return "#Packages\nsudo yum install " + ' '.join(packages)


###### Fedora SPECIALIZATION #########################
class Fedora(roslib.os_detect.Fedora, YumInstall, rosdep.base_rosdep.RosdepBaseOS): 
    """This class provides the Rosdep OS API for by combining the Fedora
    OSDetect API and the YumInstall API
    """
    pass
                 
###### END Fedora SPECIALIZATION ########################

###### Rhel SPECIALIZATION #########################
class Rhel(roslib.os_detect.Rhel, YumInstall, rosdep.base_rosdep.RosdepBaseOS): 
    """This class provides the Red Hat Enterprise Linux Rosdep OS API
    for by combining the RHEL OSDetect API and the YumInstall API
    """
    pass
###### END Rhel SPECIALIZATION ########################