diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2014-08-16 14:53:57 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2014-08-16 14:53:57 -0700 |
commit | 221cf6acb932442f5964243eb3413a1d921920c8 (patch) | |
tree | 18648f5438ac402ef44089a126f69891f62110c8 /bin | |
parent | 57ddbd282aa58b084c1e2f3a2204a6fb9e7ac6e4 (diff) | |
download | spack-221cf6acb932442f5964243eb3413a1d921920c8.tar.gz spack-221cf6acb932442f5964243eb3413a1d921920c8.tar.bz2 spack-221cf6acb932442f5964243eb3413a1d921920c8.tar.xz spack-221cf6acb932442f5964243eb3413a1d921920c8.zip |
Consolidate most module code into spack.modules and spack.cmd.module
- One file with all the module classes (spack/modules.py)
- Has an EnvModule superclass that does most of the work and consolidates common code
- Subclasses have specializations for different module systems (TclModule, Dotkit)
- One command (spack module) for all the types of modules to use
- the one command is used by the scripts, only need to maintain in one place
- has some subcommands for different module types, but they're handled mostly generically.
- Consolidate zsh support into a single setup-env.sh script.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/spack | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -75,6 +75,13 @@ for cmd in spack.cmd.commands: module = spack.cmd.get_module(cmd) subparser = subparsers.add_parser(cmd, help=module.description) module.setup_parser(subparser) + +# Just print help and exit if run with no arguments at all +if len(sys.argv) == 1: + parser.print_help() + sys.exit(1) + +# actually parse the args. args = parser.parse_args() # Set up environment based on args. |