(requirement)
return " (%s)" % ','.join(sorted(requires_dist))
Return the version specifier for a requirement in PEP 345/566 fashion.
Return the version specifier for a requirement in PEP 345/566 fashion.
Return the version specifier for a requirement in PEP 345 / 566 fashion .
def requires_to_requires_dist(requirement):
    """Return the version specifier for a requirement in PEP 345/566 fashion."""
    if getattr(requirement, 'url', None):
        return " @ " + requirement.url

    requires_dist = []
    for op, ver in requirement.specs:
        requires_dist.append(op + ver)
    if not requires_dist:
        return ''
    return " (%s)" % ','.join(sorted(requires_dist))
def requires_to_requires_dist ( requirement ) : if getattr ( requirement , 'url' , None ) : return " @ " + requirement . url requires_dist = [ ] for op , ver in requirement . specs : requires_dist . append ( op + ver ) if not requires_dist : return '' return " (%s)" % ',' . join ( sorted ( requires_dist ) )