summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2013-04-04 09:52:15 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2013-04-04 10:22:49 -0700
commit422d291b111464599618a538ee1ca3334c698ab8 (patch)
tree87ca426db9296f94db0a7331ee197966e1d52ac1 /bin
parente1551de976355bdd7836c6e38a045df9ec91f0d0 (diff)
downloadspack-422d291b111464599618a538ee1ca3334c698ab8.tar.gz
spack-422d291b111464599618a538ee1ca3334c698ab8.tar.bz2
spack-422d291b111464599618a538ee1ca3334c698ab8.tar.xz
spack-422d291b111464599618a538ee1ca3334c698ab8.zip
This adds support for multi-platform methods.
You can now do this: class MyPackage(Package): def install(self): ...default install... @platform('bgqos_0') def install(self): ...specialized install for bgq... This works on functions other than install, as well (as long as they're in a Package)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/spack b/bin/spack
index 13312a69d6..294334ac43 100755
--- a/bin/spack
+++ b/bin/spack
@@ -15,6 +15,7 @@ sys.path.insert(0, SPACK_LIB_PATH)
# clean up the scope and start using spack package instead.
del SPACK_FILE, SPACK_PREFIX, SPACK_LIB_PATH
import spack
+import spack.tty as tty
# Command parsing
parser = argparse.ArgumentParser(
@@ -43,4 +44,7 @@ spack.debug = args.debug
# Try to load the particular command asked for and run it
command = spack.cmd.get_command(args.command)
-command(parser, args)
+try:
+ command(parser, args)
+except KeyboardInterrupt:
+ tty.die("Got a keyboard interrupt from the user.")