'Called by the parser to add another spec as a dependency.'

def _add_dependency(self, spec, deptypes):

    if (spec.name in self._dependencies):
        raise DuplicateDependencyError(("Cannot    depend    on    '%s'    twice" % spec))
    dspec = DependencySpec(self, spec, deptypes)
    self._dependencies[spec.name] = dspec
    spec._dependents[self.name] = dspec
