@property
    def needs_closure(self):
        stack = [] + self.needs
        rv = []
        while stack:
            top = stack.pop()
            if top not in rv:
                rv.append(top)
                needs = []
                if environment.get_task(top):
                    deptask = environment.get_task(top)

                    if not isinstance(deptask, Task):
                        raise BuildFailure("Dependency %s is not a Task (only tasks allowed in @needs)" % deptask)

                    needs = deptask.needs

                for t in needs:
                    stack.append(t)

        return rv
dataset/ETHPy150Open paver/paver/paver/tasks.py/Task.needs_closure/original