diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-30 15:40:11 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-30 23:55:00 -0700 |
commit | b9626229751ff91299b2a4adfb3df1c2b2529dc0 (patch) | |
tree | 1d4d5d40cf063285a414bed7732b0c119951d98e | |
parent | db89b534bdf92d9f16cf8f335e4a96e4685e14ff (diff) | |
download | spack-b9626229751ff91299b2a4adfb3df1c2b2529dc0.tar.gz spack-b9626229751ff91299b2a4adfb3df1c2b2529dc0.tar.bz2 spack-b9626229751ff91299b2a4adfb3df1c2b2529dc0.tar.xz spack-b9626229751ff91299b2a4adfb3df1c2b2529dc0.zip |
Add `spack arch --platform` option
-rw-r--r-- | lib/spack/spack/cmd/arch.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py index 1badd40f7f..4e29230c28 100644 --- a/lib/spack/spack/cmd/arch.py +++ b/lib/spack/spack/cmd/arch.py @@ -24,8 +24,18 @@ ############################################################################## import spack.architecture as architecture -description = "Print the architecture for this machine" +description = "Print architecture information about this machine." + + +def setup_parser(subparser): + parts = subparser.add_mutually_exclusive_group() + parts.add_argument( + '-p', '--platform', action='store_true', default=False, + help="Print only the platform.") def arch(parser, args): - print architecture.sys_type() + if args.platform: + print architecture.platform() + else: + print architecture.sys_type() |