extensions: add an installed_extensions_for method
This commit is contained in:
parent
56bafdc282
commit
650ca7db9e
@ -90,7 +90,7 @@ def extensions(parser, args):
|
||||
# List specs of installed extensions.
|
||||
#
|
||||
installed = [s.spec
|
||||
for s in spack.store.db.activated_extensions_for(spec)]
|
||||
for s in spack.store.db.installed_extensions_for(spec)]
|
||||
|
||||
print
|
||||
if not installed:
|
||||
|
@ -740,6 +740,16 @@ def installed_relatives(self, spec, direction='children', transitive=True):
|
||||
relatives.add(relative)
|
||||
return relatives
|
||||
|
||||
@_autospec
|
||||
def installed_extensions_for(self, extendee_spec):
|
||||
"""
|
||||
Return the specs of all packages that extend
|
||||
the given spec
|
||||
"""
|
||||
for spec in self.query():
|
||||
if spec.package.extends(extendee_spec):
|
||||
yield spec.package
|
||||
|
||||
@_autospec
|
||||
def activated_extensions_for(self, extendee_spec):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user