(target_dicts, roots)
return list(dependencies - set(roots))
Returns the recursive list of target dependencies.
Returns the recursive list of target dependencies.
Returns the recursive list of target dependencies .
def DeepDependencyTargets(target_dicts, roots):
    """Returns the recursive list of target dependencies."""
    dependencies = set()
    pending = set(roots)
    while pending:
        # Pluck out one.
        r = pending.pop()
        # Skip if visited already.
        if r in dependencies:
            continue
        # Add it.
        dependencies.add(r)
        # Add its children.
        spec = target_dicts[r]
        pending.update(set(spec.get("dependencies", [])))
        pending.update(set(spec.get("dependencies_original", [])))
    return list(dependencies - set(roots))
def DeepDependencyTargets ( target_dicts , roots ) : dependencies = set ( ) pending = set ( roots ) while pending : # Pluck out one. r = pending . pop ( ) # Skip if visited already. if r in dependencies : continue # Add it. dependencies . add ( r ) # Add its children. spec = target_dicts [ r ] pending . update ( set ( spec . get ( "dependencies" , [ ] ) ) ) pending . update ( set ( spec . get ( "dependencies_original" , [ ] ) ) ) return list ( dependencies - set ( roots ) )