diff options
-rw-r--r-- | lib/spack/spack/spec.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8336a6f8a0..39dad67d2c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1559,6 +1559,15 @@ class Spec(object): return spec @staticmethod + def dependencies_from_node_dict(node): + name = next(iter(node)) + node = node[name] + if 'dependencies' not in node: + return + for t in Spec.read_yaml_dep_specs(node['dependencies']): + yield t + + @staticmethod def read_yaml_dep_specs(dependency_dict): """Read the DependencySpec portion of a YAML-formatted Spec. |