summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-09-04 10:12:52 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-09-04 10:12:52 +0200
commit47f6a6d3cfd1285fb5d8cd95a415c8a24045b330 (patch)
tree8f0b73ead979cd5e9f8181642d0ee1cf1ddff79b /bin
parentf5433477b9f7c98ca00947cf1b1fdc106cca1080 (diff)
parent16c5403ab3ca35dfa6d715ce2c5434c65de81c17 (diff)
downloadspack-47f6a6d3cfd1285fb5d8cd95a415c8a24045b330.tar.gz
spack-47f6a6d3cfd1285fb5d8cd95a415c8a24045b330.tar.bz2
spack-47f6a6d3cfd1285fb5d8cd95a415c8a24045b330.tar.xz
spack-47f6a6d3cfd1285fb5d8cd95a415c8a24045b330.zip
Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases_rebase
Conflicts: lib/spack/spack/build_environment.py lib/spack/spack/package.py var/spack/repos/builtin/packages/astyle/package.py var/spack/repos/builtin/packages/lzo/package.py var/spack/repos/builtin/packages/openjpeg/package.py var/spack/repos/builtin/packages/swiftsim/package.py
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack18
1 files changed, 13 insertions, 5 deletions
diff --git a/bin/spack b/bin/spack
index 9fed11f33b..17586cc1f6 100755
--- a/bin/spack
+++ b/bin/spack
@@ -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:
@@ -176,7 +184,7 @@ def main():
if args.profile:
import cProfile
- cProfile.run('main()', sort='tottime')
+ cProfile.run('main()', sort='time')
elif args.pdb:
import pdb
pdb.run('main()')