예제 #1
0
def get_view(os_name, os_version, ros_distro):
    global view_cache
    key = os_name + os_version + ros_distro
    if key not in view_cache:
        value = get_catkin_view(ros_distro, os_name, os_version, False)
        view_cache[key] = value
    return view_cache[key]
예제 #2
0
파일: common.py 프로젝트: nayomal/bloom
def get_view(os_name, os_version, ros_distro):
    global view_cache
    key = os_name + os_version + ros_distro
    if key not in view_cache:
        value = get_catkin_view(ros_distro, os_name, os_version, False)
        view_cache[key] = value
    return view_cache[key]
예제 #3
0
def init_environment():
    global os_name, os_version, rdistro, ctx, os_installers, default_os_installer, dist_data, rindex, rcache, rview

    ctx = create_default_installer_context()
    os_installers = ctx.get_os_installer_keys(os_name)
    default_os_installer = ctx.get_default_os_installer_key(os_name)
    rindex = get_index(get_index_url())
    dist_data = _get_dist_file_data(rindex, rdistro, 'distribution')
    rcache = get_distribution(rindex, rdistro)
    rview = get_catkin_view(rdistro, os_name, os_version, False)
예제 #4
0
def test_workflow():
    try:
        installer = get_installer(APT_INSTALLER)
        view = get_catkin_view('fuerte', 'ubuntu', 'lucid')
        resolved = resolve_for_os('cmake', view, installer, 'ubuntu', 'lucid')
        assert ['cmake'] == resolved
        resolved = resolve_for_os('python', view, installer, 'ubuntu', 'lucid')
        assert resolved == ['python-dev']
    except ValidationFailed:
        # tests fail on the server because 'rosdep init' has not been run
        pass
def test_workflow():
    try:
        installer = get_installer(APT_INSTALLER)
        view = get_catkin_view("fuerte", "ubuntu", "lucid")
        resolved = resolve_for_os("cmake", view, installer, "ubuntu", "lucid")
        assert ["cmake"] == resolved
        resolved = resolve_for_os("python", view, installer, "ubuntu", "lucid")
        assert resolved == ["python-dev"]
    except ValidationFailed:
        # tests fail on the server because 'rosdep init' has not been run
        pass
예제 #6
0
def test_workflow():
    try:
        installer = get_apt_installer()
        view = get_catkin_view('fuerte', 'ubuntu', 'lucid')
        resolved = resolve_for_apt('cmake', view, installer, 'ubuntu', 'lucid')
        assert ['cmake'] == resolved
        resolved = resolve_for_apt('python', view, installer, 'ubuntu', 'lucid')
        assert resolved == ['python-dev']
    except ValidationFailed:
        # tests fail on the server because 'rosdep init' has not been run
        pass
def initialize_resolver(rosdistro_name, os_name, os_code_name):
    # resolve rosdep keys into binary package names
    ctx = create_default_installer_context()
    try:
        installer_key = ctx.get_default_os_installer_key(os_name)
    except KeyError:
        raise RuntimeError(
            "Could not determine the rosdep installer for '%s'" % os_name)
    installer = ctx.get_installer(installer_key)
    view = get_catkin_view(rosdistro_name, os_name, os_code_name, update=False)
    return {
        'os_name': os_name,
        'os_code_name': os_code_name,
        'installer': installer,
        'view': view,
    }
def initialize_resolver(rosdistro_name, os_name, os_code_name):
    # resolve rosdep keys into binary package names
    ctx = create_default_installer_context()
    try:
        installer_key = ctx.get_default_os_installer_key(os_name)
    except KeyError:
        raise RuntimeError(
            "Could not determine the rosdep installer for '%s'" % os_name)
    installer = ctx.get_installer(installer_key)
    view = get_catkin_view(rosdistro_name, os_name, os_code_name, update=False)
    return {
        'os_name': os_name,
        'os_code_name': os_code_name,
        'installer': installer,
        'view': view,
    }
예제 #9
0
def resolve_rosdeps(rosdep_keys, rosdistro_name, os_name, os_platform):
    """
    :raises: :exc:`rosdep2.catkin_support.ValidationFailed`
    :raises: :exc:`KeyError`
    :raises: :exc:`rosdep2.ResolutionError`
    """
    assert os_name == OS_FEDORA
    assert os_platform
    assert type(rosdep_keys) == list

    # use the catkin_support module in rosdep2 as it does the same business

    # apt-install resolves data
    yum_installer = get_installer(YUM_INSTALLER)
    # rosdep view is our view into the rosdep database
    rosdep_view = get_catkin_view(rosdistro_name, os_name, os_platform)

    # iterate through all our keys to resolve
    fedora_deps = set()
    for dep in rosdep_keys:
        resolved = resolve_for_os(dep, rosdep_view, yum_installer, os_name, os_platform)
        fedora_deps.update(resolved)
    return list(fedora_deps)
예제 #10
0
def resolve_rosdeps(rosdep_keys, rosdistro_name, os_name, os_platform):
    """
    :raises: :exc:`rosdep2.catkin_support.ValidationFailed`
    :raises: :exc:`KeyError`
    :raises: :exc:`rosdep2.ResolutionError`
    """
    assert os_name == OS_UBUNTU
    assert os_platform
    assert type(rosdep_keys) == list

    # use the catkin_support module in rosdep2 as it does the same business

    # apt-install resolves data
    apt_installer = get_installer(APT_INSTALLER)
    # rosdep view is our view into the rosdep database
    rosdep_view = get_catkin_view(rosdistro_name, os_name, os_platform)

    # iterate through all our keys to resolve
    ubuntu_deps = set()
    for dep in rosdep_keys:
        resolved = resolve_for_os(dep, rosdep_view, apt_installer, os_name,
                                  os_platform)
        ubuntu_deps.update(resolved)
    return list(ubuntu_deps)
예제 #11
0
파일: __init__.py 프로젝트: smits/bloom
 def get_rosdep_view(self, debian_distro, os_name):
     rosdistro = self.rosdistro
     from rosdep2.catkin_support import get_catkin_view
     return get_catkin_view(rosdistro, os_name, debian_distro, update=False)