Ejemplo n.º 1
0
def extract_dependencies(plugins, v_type='Release'):
    """ Extract dependencies from the plugin.

    The `v_type` says what kind of version we want.

    """
    if not type(plugins) is list:
        plugins = [plugins]

    deps = list()

    for plugin in plugins:
        for version in plugin['versions']:
            if utils.type_fits(version['type'], v_type):
                deps.extend(version['hard_dependencies'])
                break

    return deps
Ejemplo n.º 2
0
def extract_dependencies(plugins, v_type='Release'):
    """ Extract dependencies from the plugin.

    The `v_type` says what kind of version we want.

    """
    if not type(plugins) is list:
        plugins = [plugins]

    deps = list()

    for plugin in plugins:
        for version in plugin['versions']:
            if utils.type_fits(version['type'], v_type):
                deps.extend(version['hard_dependencies'])
                break

    return deps
Ejemplo n.º 3
0
def select_newest_version(plugin, v_type="Release"):
    """ Return the newest version in plugin which is compatible `v_type`. """
    for version in plugin['versions']:
        if utils.type_fits(version['type'], v_type):
            return version
Ejemplo n.º 4
0
def select_newest_version(plugin, v_type="Release"):
    """ Return the newest version in plugin which is compatible `v_type`. """
    for version in plugin['versions']:
        if utils.type_fits(version['type'], v_type):
            return version