From 4dad5aab8402f787afd8f9e440ac4bbbecd4b80f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 18 Jan 2017 20:49:48 -0600 Subject: Add spack edit option for build systems (#2865) --- lib/spack/spack/__init__.py | 1 + lib/spack/spack/cmd/edit.py | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 34a7b01616..0b1934112e 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -46,6 +46,7 @@ build_env_path = join_path(lib_path, "env") module_path = join_path(lib_path, "spack") platform_path = join_path(module_path, 'platforms') compilers_path = join_path(module_path, "compilers") +build_systems_path = join_path(module_path, 'build_systems') operating_system_path = join_path(module_path, 'operating_systems') test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") diff --git a/lib/spack/spack/cmd/edit.py b/lib/spack/spack/cmd/edit.py index 77f23333b6..23fd307ab4 100644 --- a/lib/spack/spack/cmd/edit.py +++ b/lib/spack/spack/cmd/edit.py @@ -69,6 +69,10 @@ def setup_parser(subparser): # Various types of Spack files that can be edited # Edits package files by default + excl_args.add_argument( + '-b', '--build-system', dest='path', action='store_const', + const=spack.build_systems_path, + help="Edit the build system with the supplied name.") excl_args.add_argument( '-c', '--command', dest='path', action='store_const', const=spack.cmd.command_path, -- cgit v1.2.3-60-g2f50