summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-03-24 08:40:14 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-03-24 08:40:45 -0700
commit8364f0404c01c1f22012b9029eabcdf862bd7bbb (patch)
tree13561d4a1ff3e2daad41376881dbc0c92f4998dc
parentaf92250c7e0c7fc59cfb4381928ed4a547f2dcf3 (diff)
downloadspack-8364f0404c01c1f22012b9029eabcdf862bd7bbb.tar.gz
spack-8364f0404c01c1f22012b9029eabcdf862bd7bbb.tar.bz2
spack-8364f0404c01c1f22012b9029eabcdf862bd7bbb.tar.xz
spack-8364f0404c01c1f22012b9029eabcdf862bd7bbb.zip
Add some options to spec command.
-rw-r--r--lib/spack/spack/cmd/spec.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py
index e2cb5689c0..407519313c 100644
--- a/lib/spack/spack/cmd/spec.py
+++ b/lib/spack/spack/cmd/spec.py
@@ -33,20 +33,27 @@ import spack.url as url
description = "print out abstract and concrete versions of a spec."
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")
+
def spec(parser, args):
+ kwargs = { 'ids' : args.ids,
+ 'indent' : 2,
+ 'color' : True }
+
for spec in spack.cmd.parse_specs(args.specs):
print "Input spec"
print "------------------------------"
- print spec.tree(color=True, indent=2)
+ print spec.tree(**kwargs)
print "Normalized"
print "------------------------------"
spec.normalize()
- print spec.tree(color=True, indent=2)
+ print spec.tree(**kwargs)
print "Concretized"
print "------------------------------"
spec.concretize()
- print spec.tree(color=True, indent=2)
+ print spec.tree(**kwargs)