diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-08-30 20:43:29 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-08-30 20:43:29 -0700 |
commit | 918cb1692114a16eb738a80023fcdd1c8d98b011 (patch) | |
tree | 9d4142706272c100dc3395f0c027effec5fd3e2e /bin | |
parent | 7e4c6afd9160beedf7956bc5492c93eb30f93a3e (diff) | |
parent | 176a84a8285b4117c9465f92d323dbb6aa4eb82c (diff) | |
download | spack-918cb1692114a16eb738a80023fcdd1c8d98b011.tar.gz spack-918cb1692114a16eb738a80023fcdd1c8d98b011.tar.bz2 spack-918cb1692114a16eb738a80023fcdd1c8d98b011.tar.xz spack-918cb1692114a16eb738a80023fcdd1c8d98b011.zip |
Merge branch 'features/travis' into develop
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/spack | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -56,8 +56,15 @@ with warnings.catch_warnings(): # Spack, were removed, but shadow system modules that Spack still # imports. If we leave them, Spack will fail in mysterious ways. # TODO: more elegant solution for orphaned pyc files. -orphaned_pyc_files = [os.path.join(SPACK_EXTERNAL_LIBS, n) - for n in ('functools.pyc', 'ordereddict.pyc')] +orphaned_pyc_files = [ + os.path.join(SPACK_EXTERNAL_LIBS, 'functools.pyc'), + os.path.join(SPACK_EXTERNAL_LIBS, 'ordereddict.pyc'), + os.path.join(SPACK_LIB_PATH, 'spack', 'platforms', 'cray_xc.pyc'), + os.path.join(SPACK_LIB_PATH, 'spack', 'cmd', 'package-list.pyc'), + os.path.join(SPACK_LIB_PATH, 'spack', 'cmd', 'test-install.pyc'), + os.path.join(SPACK_LIB_PATH, 'spack', 'cmd', 'url-parse.pyc') +] + for pyc_file in orphaned_pyc_files: if not os.path.exists(pyc_file): continue @@ -120,7 +127,8 @@ subparsers = parser.add_subparsers(metavar='SUBCOMMAND', dest="command") import spack.cmd for cmd in spack.cmd.commands: module = spack.cmd.get_module(cmd) - subparser = subparsers.add_parser(cmd, help=module.description) + cmd_name = cmd.replace('_', '-') + subparser = subparsers.add_parser(cmd_name, help=module.description) module.setup_parser(subparser) # Just print help and exit if run with no arguments at all @@ -156,7 +164,7 @@ def main(): spack.curl.add_default_arg('-k') # Try to load the particular command asked for and run it - command = spack.cmd.get_command(args.command) + command = spack.cmd.get_command(args.command.replace('-', '_')) try: return_val = command(parser, args) except SpackError as e: |