summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-06-06 18:15:52 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-06-06 18:15:52 -0700
commit8215c85619ccb405d809b0dbc1127685d68210c9 (patch)
tree47ac05d993371606abadda9f29fdfa85b65eab7a /bin
parentc10773503b2b07d1968cabda48f845075f9117a4 (diff)
parentab31f989db4de515aafd900c9235161ce45993b3 (diff)
downloadspack-8215c85619ccb405d809b0dbc1127685d68210c9.tar.gz
spack-8215c85619ccb405d809b0dbc1127685d68210c9.tar.bz2
spack-8215c85619ccb405d809b0dbc1127685d68210c9.tar.xz
spack-8215c85619ccb405d809b0dbc1127685d68210c9.zip
Merge branch 'develop' into features/fastmath
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack30
1 files changed, 24 insertions, 6 deletions
diff --git a/bin/spack b/bin/spack
index c49caf37f9..354754594e 100755
--- a/bin/spack
+++ b/bin/spack
@@ -49,25 +49,39 @@ except OSError:
# clean up the scope and start using spack package instead.
del SPACK_FILE, SPACK_PREFIX, SPACK_LIB_PATH
import llnl.util.tty as tty
+from llnl.util.tty.color import *
import spack
from spack.error import SpackError
from external import argparse
# Command parsing
parser = argparse.ArgumentParser(
- description='Spack: the Supercomputing PACKage Manager.')
-parser.add_argument('-V', '--version', action='version',
- version="%s" % spack.spack_version)
-parser.add_argument('-v', '--verbose', action='store_true',
- help="Print additional output during builds")
+ formatter_class=argparse.RawTextHelpFormatter,
+ description="Spack: the Supercomputing PACKage Manager." + colorize("""
+
+spec expressions:
+ PACKAGE [CONSTRAINTS]
+
+ CONSTRAINTS:
+ @c{@version}
+ @g{%compiler @compiler_version}
+ @B{+variant}
+ @r{-variant} or @r{~variant}
+ @m{=architecture}
+ [^DEPENDENCY [CONSTRAINTS] ...]"""))
+
parser.add_argument('-d', '--debug', action='store_true',
help="Write out debug logs during compile")
parser.add_argument('-k', '--insecure', action='store_true',
- help="Do not check ssl certificates when downloading archives.")
+ help="Do not check ssl certificates when downloading.")
parser.add_argument('-m', '--mock', action='store_true',
help="Use mock packages instead of real ones.")
parser.add_argument('-p', '--profile', action='store_true',
help="Profile execution using cProfile.")
+parser.add_argument('-v', '--verbose', action='store_true',
+ help="Print additional output during builds")
+parser.add_argument('-V', '--version', action='version',
+ version="%s" % spack.spack_version)
# each command module implements a parser() function, to which we pass its
# subparser for setup.
@@ -93,6 +107,10 @@ def main():
tty.set_debug(args.debug)
spack.debug = args.debug
+ if spack.debug:
+ import spack.util.debug as debug
+ debug.register_interrupt_handler()
+
spack.spack_working_dir = working_dir
if args.mock:
from spack.packages import PackageDB