DB0.dependson(DA0, DA1) DB1.dependson(DA1, R3) DC0.dependson(DB0, DB1) DC1.dependson(DB1) DC2.dependson(DB1) # Option 1: # Define a function that builds individual dependencies. The *buildmanager* # decorator transforms it into a loop that builds all dependencies above a # target @buildmanager def batchbuilder(dependency, reason): print dependency.name, reason return 0 roots = DC0.roots() for root in roots: print root.name batchbuilder(DC0) print "" # Option 2: # Implement the build loop manually from depgraph import buildall def build(dependency, reason): # This may have the same logic as `batchbuilder` above, but we # will call it directly rather than wrapping it in @buildmanager # [....] return 0