diff --git a/lib/spack/spack/cmd/add.py b/lib/spack/spack/cmd/add.py index d154a6bc7a4..6dc903ae68a 100644 --- a/lib/spack/spack/cmd/add.py +++ b/lib/spack/spack/cmd/add.py @@ -12,7 +12,7 @@ description = 'add a spec to an environment' -section = "environment" +section = "environments" level = "long" diff --git a/lib/spack/spack/cmd/cd.py b/lib/spack/spack/cmd/cd.py index 6a10f6f8aad..b2dae30fd81 100644 --- a/lib/spack/spack/cmd/cd.py +++ b/lib/spack/spack/cmd/cd.py @@ -8,7 +8,7 @@ import spack.cmd.location description = "cd to spack directories in the shell" -section = "environment" +section = "developer" level = "long" diff --git a/lib/spack/spack/cmd/concretize.py b/lib/spack/spack/cmd/concretize.py index abc6aa57d48..728718e5024 100644 --- a/lib/spack/spack/cmd/concretize.py +++ b/lib/spack/spack/cmd/concretize.py @@ -6,7 +6,7 @@ import spack.environment as ev description = 'concretize an environment and write a lockfile' -section = "environment" +section = "environments" level = "long" diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 34031946593..c478f3c4122 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -21,8 +21,8 @@ import spack.util.string as string description = "manage virtual environments" -section = "environment" -level = "long" +section = "environments" +level = "short" #: List of subcommands of `spack env` diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index b606af36949..87822edb25c 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -7,7 +7,7 @@ from spack.cmd.common import print_module_placeholder_help, arguments description = "add package to environment using `module load`" -section = "environment" +section = "modules" level = "short" diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index c97075441d1..a878f63df8a 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -14,8 +14,8 @@ import spack.paths import spack.repo -description = "print out locations of various directories used by Spack" -section = "environment" +description = "print out locations of packages and spack directories" +section = "basic" level = "long" diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 5ef153b3144..4d70df431bf 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -20,7 +20,7 @@ from spack.error import SpackError from spack.util.spack_yaml import syaml_dict -description = "manage mirrors" +description = "manage mirrors (source and binary)" section = "config" level = "long" diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index f100293cc0d..c71f84ef7d8 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -12,7 +12,7 @@ import spack.cmd.modules.tcl description = "manipulate module files" -section = "environment" +section = "modules" level = "short" diff --git a/lib/spack/spack/cmd/remove.py b/lib/spack/spack/cmd/remove.py index 5e4a6e59396..ec0b2cd2184 100644 --- a/lib/spack/spack/cmd/remove.py +++ b/lib/spack/spack/cmd/remove.py @@ -12,7 +12,7 @@ description = 'remove specs from an environment' -section = "environment" +section = "environments" level = "long" diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index 60f72bb9891..d8730aea920 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -7,7 +7,7 @@ from spack.cmd.common import print_module_placeholder_help description = "remove package from environment using `module unload`" -section = "environment" +section = "modules" level = "short" diff --git a/lib/spack/spack/cmd/unuse.py b/lib/spack/spack/cmd/unuse.py index 346fb285ee8..4aab78b17b6 100644 --- a/lib/spack/spack/cmd/unuse.py +++ b/lib/spack/spack/cmd/unuse.py @@ -7,7 +7,7 @@ from spack.cmd.common import print_module_placeholder_help description = "remove package from environment using dotkit" -section = "environment" +section = "modules" level = "long" diff --git a/lib/spack/spack/cmd/use.py b/lib/spack/spack/cmd/use.py index 20072c3ef96..80ae80329ac 100644 --- a/lib/spack/spack/cmd/use.py +++ b/lib/spack/spack/cmd/use.py @@ -7,7 +7,7 @@ from spack.cmd.common import print_module_placeholder_help, arguments description = "add package to environment using dotkit" -section = "environment" +section = "modules" level = "long" diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index 0d1f8e20cbc..9768458f02a 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -43,7 +43,7 @@ from spack.filesystem_view import YamlFilesystemView description = "produce a single-rooted directory view of packages" -section = "environment" +section = "environments" level = "short" actions_link = ["symlink", "add", "soft", "hardlink", "hard"] diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index ea1ec0df96e..90ac30aaba9 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -19,6 +19,7 @@ from six import StringIO import llnl.util.tty as tty +import llnl.util.tty.color as color from llnl.util.tty.log import log_output import spack @@ -324,12 +325,12 @@ def make_argument_parser(**kwargs): help="when to colorize output (default: auto)") parser.add_argument( '-C', '--config-scope', dest='config_scopes', action='append', - metavar='DIRECTORY', help="use an additional configuration scope") + metavar='DIR', help="use an additional configuration scope") parser.add_argument( '-d', '--debug', action='store_true', help="write out debug logs during compile") parser.add_argument( - '-D', '--pdb', action='store_true', + '--pdb', action='store_true', help="run spack under the pdb debugger") env_group = parser.add_mutually_exclusive_group() @@ -337,8 +338,11 @@ def make_argument_parser(**kwargs): '-e', '--env', dest='env', metavar='ENV', action='store', help="run with a specific environment (see spack env)") env_group.add_argument( - '-E', '--env-dir', metavar='DIR', action='store', + '-D', '--env-dir', dest='env_dir', metavar='DIR', action='store', help="run with an environment directory (ignore named environments)") + env_group.add_argument( + '-E', '--no-env', dest='no_env', action='store_true', + help="run without any environments activated (see spack env)") parser.add_argument( '--use-env-repo', action='store_true', help="when running in an environment, use its package repository") @@ -359,7 +363,7 @@ def make_argument_parser(**kwargs): '-p', '--profile', action='store_true', dest='spack_profile', help="profile execution using cProfile") parser.add_argument( - '-P', '--sorted-profile', default=None, metavar="STAT", + '--sorted-profile', default=None, metavar="STAT", help="profile and sort by one or more of:\n[%s]" % ',\n '.join([', '.join(line) for line in stat_lines])) parser.add_argument( @@ -369,7 +373,7 @@ def make_argument_parser(**kwargs): '-v', '--verbose', action='store_true', help="print additional output during builds") parser.add_argument( - '-s', '--stacktrace', action='store_true', + '--stacktrace', action='store_true', help="add stacktraces to all printed statements") parser.add_argument( '-V', '--version', action='store_true', @@ -410,7 +414,7 @@ def setup_main_options(args): spack.config.set('config:verify_ssl', False, scope='command_line') # when to use color (takes always, auto, or never) - tty.color.set_color_when(args.color) + color.set_color_when(args.color) def allows_unknown_args(command): @@ -622,7 +626,8 @@ def main(argv=None): args, unknown = parser.parse_known_args(argv) # activate an environment if one was specified on the command line - activate_environment(args.env, args.env_dir, args.use_env_repo) + if not args.no_env: + activate_environment(args.env, args.env_dir, args.use_env_repo) # make spack.config aware of any command line configuration scopes if args.config_scopes: