Skip to content
Snippets Groups Projects
Commit b9626229 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Add `spack arch --platform` option

parent db89b534
No related branches found
No related tags found
No related merge requests found
...@@ -24,8 +24,18 @@ ...@@ -24,8 +24,18 @@
############################################################################## ##############################################################################
import spack.architecture as architecture 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): def arch(parser, args):
print architecture.sys_type() if args.platform:
print architecture.platform()
else:
print architecture.sys_type()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment