Add some options to spec command.
This commit is contained in:
parent
af92250c7e
commit
8364f0404c
@ -33,20 +33,27 @@
|
|||||||
description = "print out abstract and concrete versions of a spec."
|
description = "print out abstract and concrete versions of a spec."
|
||||||
|
|
||||||
def setup_parser(subparser):
|
def setup_parser(subparser):
|
||||||
|
subparser.add_argument('-i', '--ids', action='store_true',
|
||||||
|
help="show numerical ids for dependencies.")
|
||||||
subparser.add_argument('specs', nargs=argparse.REMAINDER, help="specs of packages")
|
subparser.add_argument('specs', nargs=argparse.REMAINDER, help="specs of packages")
|
||||||
|
|
||||||
|
|
||||||
def spec(parser, args):
|
def spec(parser, args):
|
||||||
|
kwargs = { 'ids' : args.ids,
|
||||||
|
'indent' : 2,
|
||||||
|
'color' : True }
|
||||||
|
|
||||||
for spec in spack.cmd.parse_specs(args.specs):
|
for spec in spack.cmd.parse_specs(args.specs):
|
||||||
print "Input spec"
|
print "Input spec"
|
||||||
print "------------------------------"
|
print "------------------------------"
|
||||||
print spec.tree(color=True, indent=2)
|
print spec.tree(**kwargs)
|
||||||
|
|
||||||
print "Normalized"
|
print "Normalized"
|
||||||
print "------------------------------"
|
print "------------------------------"
|
||||||
spec.normalize()
|
spec.normalize()
|
||||||
print spec.tree(color=True, indent=2)
|
print spec.tree(**kwargs)
|
||||||
|
|
||||||
print "Concretized"
|
print "Concretized"
|
||||||
print "------------------------------"
|
print "------------------------------"
|
||||||
spec.concretize()
|
spec.concretize()
|
||||||
print spec.tree(color=True, indent=2)
|
print spec.tree(**kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user