(dists, dist)
return req
Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
Recursively generate a list of distributions from *dists* that are
    required by *dist*.
Recursively generate a list of distributions from * dists * that are required by * dist * .
def get_required_dists(dists, dist):
    """Recursively generate a list of distributions from *dists* that are
    required by *dist*.

    :param dists: a list of distributions
    :param dist: a distribution, member of *dists* for which we are interested
    """
    if dist not in dists:
        raise DistlibException('given distribution %r is not a member '
                               'of the list' % dist.name)
    graph = make_graph(dists)

    req = []  # required distributions
    todo = graph.adjacency_list[dist]  # list of nodes we should inspect

    while todo:
        d = todo.pop()[0]
        req.append(d)
        for pred in graph.adjacency_list[d]:
            if pred not in req:
                todo.append(pred)

    return req
def get_required_dists ( dists , dist ) : if dist not in dists : raise DistlibException ( 'given distribution %r is not a member ' 'of the list' % dist . name ) graph = make_graph ( dists ) req = [ ] # required distributions todo = graph . adjacency_list [ dist ] # list of nodes we should inspect while todo : d = todo . pop ( ) [ 0 ] req . append ( d ) for pred in graph . adjacency_list [ d ] : if pred not in req : todo . append ( pred ) return req