'Return DependencyMap that points to all the dependencies in this
spec.'

def index(self, deptype=None):

    dm = DependencyMap(None)
    for spec in self.traverse(deptype=deptype):
        dm[spec.name] = spec
    return dm
