def deps_from_pyp_format(requires, runtime=True):
    """Parses dependencies extracted from setup.py.
    Args:
        requires: list of dependencies as written in setup.py of the package.
        runtime: are the dependencies runtime (True) or build time (False)?
    Returns:
        List of semi-SPECFILE dependencies (see dependency_to_rpm for format).
    """
    parsed = []
    logger.debug("Dependencies from setup.py: {0} runtime: {1}.".format(
        requires, runtime))

    for req in requires:
        try:
            parsed.append(Requirement.parse(req))
        except ValueError:
            logger.warn("Unparsable dependency {0}.".format(req),
                        exc_info=True)

    in_rpm_format = []
    for dep in parsed:
        in_rpm_format.extend(dependency_to_rpm(dep, runtime))
    logger.debug("Dependencies from setup.py in rpm format: {0}.".format(
        in_rpm_format))

    return in_rpm_format
def deps_from_pyp_format ( requires , runtime = True ) : parsed = [ ] logger . debug ( "Dependencies from setup.py: {0} runtime: {1}." . format ( requires , runtime ) ) for req in requires : try : parsed . append ( Requirement . parse ( req ) ) except ValueError : logger . warn ( "Unparsable dependency {0}." . format ( req ) , exc_info = True ) in_rpm_format = [ ] for dep in parsed : in_rpm_format . extend ( dependency_to_rpm ( dep , runtime ) ) logger . debug ( "Dependencies from setup.py in rpm format: {0}." . format ( in_rpm_format ) ) return in_rpm_format
Parses dependencies extracted from setup.py.
    Args:
        requires: list of dependencies as written in setup.py of the package.
        runtime: are the dependencies runtime (True) or build time (False)?
    Returns:
        List of semi-SPECFILE dependencies (see dependency_to_rpm for format).