diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-15 16:01:01 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-18 01:19:07 -0700 |
commit | 73f10c9363e584708a39cf02758fc837dc02b8d3 (patch) | |
tree | 0e5d0ca2c2e77035a2a9ce811d466b139663bb92 /lib | |
parent | cdc2ebee9018cc4cf067d73f269628901a8d4487 (diff) | |
download | spack-73f10c9363e584708a39cf02758fc837dc02b8d3.tar.gz spack-73f10c9363e584708a39cf02758fc837dc02b8d3.tar.bz2 spack-73f10c9363e584708a39cf02758fc837dc02b8d3.tar.xz spack-73f10c9363e584708a39cf02758fc837dc02b8d3.zip |
Fix broken `spack info` command after build dep merge.
- Added a method to get dependencies of particular types from Package
- Fixed info command.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/info.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/package.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 5774034062..f8b6ceab59 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -84,7 +84,7 @@ def print_text_info(pkg): for deptype in ('build', 'link', 'run'): print print "%s Dependencies:" % deptype.capitalize() - deps = pkg.dependencies(deptype) + deps = pkg.dependencies_of_type(deptype) if deps: colify(deps, indent=4) else: diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 7f53b461b2..3a7b61f7e6 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -565,6 +565,13 @@ class Package(object): def fetcher(self, f): self._fetcher = f + + def dependencies_of_type(self, *deptypes): + """Get subset of the dependencies with certain types.""" + return dict((name, conds) for name, conds in self.dependencies.items() + if any(d in self._deptypes[name] for d in deptypes)) + + @property def extendee_spec(self): """ |