'Evaluate all the conditions on a dependency with this name.
If the package depends on <name> in this configuration, return
the dependency.  If no conditions are True (and we don\'t
depend on it), return None.'

def _evaluate_dependency_conditions(self, name):

    pkg = spack.repo.get(self.fullname)
    conditions = pkg.dependencies[name]
    substitute_abstract_variants(self)
    dep = None
    for (when_spec, dep_spec) in conditions.items():
        sat = self.satisfies(when_spec, strict=True)
        if sat:
            if (dep is None):
                dep = Spec(name)
            try:
                dep.constrain(dep_spec)
            except UnsatisfiableSpecError as e:
                e.message = ('Conflicting    conditional    dependencies    onpackage    %s    for    spec    %s' % (self.name, self))
                raise e
    return dep
