def get_required_dists(dists, dist):
 if (dist not in dists):
  raise DistlibException((u'given distribution %r is not a member of the list' % dist.name))
 graph = make_graph(dists)
 req = []
 todo = graph.adjacency_list[dist]
 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 ( ( u'given distribution %r is not a member of the list' % dist . name ) ) graph = make_graph ( dists ) req = [ ] todo = graph . adjacency_list [ dist ] 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
recursively generate a list of distributions from *dists* that are required by *dist* .