diff --git a/lib/spack/spack/cmd/add.py b/lib/spack/spack/cmd/add.py index d154a6bc7a45654d8b3a10002aede24c0af9c685..6dc903ae68ac254c29f9c46f754e4a32e5c265da 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 6a10f6f8aad78c7a4e60b83cfcb3fc727ac1cce1..b2dae30fd81ee9dc88dd7c876d8b517c248fec0d 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 abc6aa57d485bd6beac83dbd6bd35ea118921c26..728718e502433c959067b0fda36f66f2ea02b101 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 34031946593317fb31ae5aba15781f07ce7aee15..c478f3c412276aef2b8a60c3687b5c15bbb89669 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 b606af36949ff789f569c615c2d6bc451fb882a9..87822edb25cff078da6a64144d287dad6fd19706 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 c97075441d169a746ad3e610ec115913af129203..a878f63df8a4f592c841414073e15652668445eb 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 5ef153b31444b17dc6d978856f9ce6f91946f568..4d70df431bfe9543a0b1d279dea9b63a5568127f 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 f100293cc0d81e820c8113d9df1a92a491512d0d..c71f84ef7d8ac50acd9b05357dc2608995bf9429 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 5e4a6e59396dfbf4482fcf3d538a87fe11bc08f4..ec0b2cd2184c4a5f05bbef9e3617619e00040c92 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 60f72bb989167ac5776c1abc4deabf8ebde13943..d8730aea920d355071bfcad902ebc4f692a2931d 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 346fb285ee80766228b1586286e7cf41e81dcb12..4aab78b17b6d696756183497caefbf2f5465ecee 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 20072c3ef965880e5d88f4adbbb9476b3862709f..80ae80329acbe385386470a32de632435c4bd15f 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 0d1f8e20cbc6bf17ef9f444f7edd504d807e519f..9768458f02af7cce2a3ffcc8ea3e9f4c5de97d86 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 ea1ec0df96eab444aef1eb86ce53f1b0fafd1597..90ac30aaba9e667a182b2d936629a8ad8840fbb3 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: