summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/info.py2
-rw-r--r--lib/spack/spack/package.py7
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):
"""