summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew LeGendre <legendre1@llnl.gov>2014-03-13 16:52:21 -0700
committerMatthew LeGendre <legendre1@llnl.gov>2014-03-13 16:52:21 -0700
commit6f43da74edc03c721c3f604819da07a70634da3b (patch)
treeb010f7345e05586a4a7cdbc3626d1b823eca9703
parent78abdcea16948eb1a792dc9b672871a04cac8e93 (diff)
parent03ee31e0e8cf7c58eb4aafc6912e698c0a23427e (diff)
downloadspack-6f43da74edc03c721c3f604819da07a70634da3b.tar.gz
spack-6f43da74edc03c721c3f604819da07a70634da3b.tar.bz2
spack-6f43da74edc03c721c3f604819da07a70634da3b.tar.xz
spack-6f43da74edc03c721c3f604819da07a70634da3b.zip
Merge branch 'master' into spindle
-rwxr-xr-xbin/spack11
-rw-r--r--lib/spack/spack/cmd/mirror.py3
-rw-r--r--lib/spack/spack/packages/pmgr_collective.py38
-rw-r--r--lib/spack/spack/tty.py10
-rw-r--r--lib/spack/spack/url.py4
-rw-r--r--lib/spack/spack/util/compression.py3
6 files changed, 61 insertions, 8 deletions
diff --git a/bin/spack b/bin/spack
index 72fd47d732..775a9dbd08 100755
--- a/bin/spack
+++ b/bin/spack
@@ -51,9 +51,11 @@ parser = argparse.ArgumentParser(
parser.add_argument('-V', '--version', action='version',
version="%s" % spack.spack_version)
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
- help="print additional output during builds")
+ help="Print additional output during builds")
parser.add_argument('-d', '--debug', action='store_true', dest='debug',
- help="write out debug logs during compile")
+ help="Write out debug logs during compile")
+parser.add_argument('-k', '--insecure', action='store_true', dest='insecure',
+ help="Do not check ssl certificates when downloading archives.")
parser.add_argument('-m', '--mock', action='store_true', dest='mock',
help="Use mock packages instead of real ones.")
@@ -76,6 +78,11 @@ if args.mock:
mock_path = new_path(spack.module_path, 'test', 'mock_packages')
spack.packages_path = mock_path
+# If the user asked for it, don't check ssl certs.
+if args.insecure:
+ tty.warn("You asked for --insecure, which does not check SSL certificates.")
+ spack.curl.add_default_arg('-k')
+
# Try to load the particular command asked for and run it
command = spack.cmd.get_command(args.command)
try:
diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py
index 77cbb1eb58..ec91ef0fd5 100644
--- a/lib/spack/spack/cmd/mirror.py
+++ b/lib/spack/spack/cmd/mirror.py
@@ -23,6 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
+import shutil
import argparse
import spack.packages as packages
@@ -78,7 +79,7 @@ def mirror(parser, args):
final_dst = new_path(pkg_path, basename)
os.chdir(working_dir)
- os.rename(stage.archive_file, final_dst)
+ shutil.move(stage.archive_file, final_dst)
tty.msg("Added %s to mirror" % final_dst)
finally:
diff --git a/lib/spack/spack/packages/pmgr_collective.py b/lib/spack/spack/packages/pmgr_collective.py
new file mode 100644
index 0000000000..a7e1130436
--- /dev/null
+++ b/lib/spack/spack/packages/pmgr_collective.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://scalability-llnl.github.io/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License (as published by
+# the Free Software Foundation) version 2.1 dated February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+class PmgrCollective(Package):
+ """PMGR_COLLECTIVE provides a scalable network for bootstrapping
+ MPI jobs."""
+ homepage = "http://www.sourceforge.net/projects/pmgrcollective"
+ url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz"
+# url = "http://downloads.sourceforge.net/project/pmgrcollective/pmgrcollective/PMGR_COLLECTIVE-1.0/pmgr_collective-1.0.tgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpmgrcollective%2F%3Fsource%3Ddlp&ts=1394747864&use_mirror=iweb
+
+ versions = { '1.0' : '0384d008774274cc3fc7b4d810dfd07e' }
+
+ def install(self, spec, prefix):
+ make('PREFIX="' + prefix + '"')
+ make('PREFIX="' + prefix + '"', "install")
diff --git a/lib/spack/spack/tty.py b/lib/spack/spack/tty.py
index df4760df40..b9ad3f12bf 100644
--- a/lib/spack/spack/tty.py
+++ b/lib/spack/spack/tty.py
@@ -36,27 +36,27 @@ def msg(message, *args):
def info(message, *args, **kwargs):
format = kwargs.get('format', '*b')
- cprint("@%s{==>} %s" % (format, cescape(message)))
+ cprint("@%s{==>} %s" % (format, cescape(str(message))))
for arg in args:
print indent + str(arg)
def verbose(message, *args):
if spack.verbose:
- info(message, *args, format='c')
+ info(str(message), *args, format='c')
def debug(*args):
if spack.debug:
- info("Debug: " + message, *args, format='*g')
+ info("Debug: " + str(message), *args, format='*g')
def error(message, *args):
- info("Error: " + message, *args, format='*r')
+ info("Error: " + str(message), *args, format='*r')
def warn(message, *args):
- info("Warning: " + message, *args, format='*Y')
+ info("Warning: " + str(message), *args, format='*Y')
def die(message, *args):
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index 0bc7ff53b4..a4c32eb37b 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -102,6 +102,9 @@ def parse_version_string_with_indices(path):
# e.g. https://github.com/petdance/ack/tarball/1.93_02
(r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path),
+ # e.g. https://github.com/hpc/lwgrp/archive/v1.0.1.tar.gz
+ (r'github.com/[^/]+/[^/]+/archive/v?(\d+(?:\.\d+)*)\.tar\.gz$', path),
+
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
(r'[-_](R\d+[AB]\d*(-\d+)?)', path),
@@ -169,6 +172,7 @@ def parse_name(path, ver=None):
ntypes = (r'/sourceforge/([^/]+)/',
r'/([^/]+)/(tarball|zipball)/',
r'/([^/]+)[_.-](bin|dist|stable|src|sources)[_.-]%s' % ver,
+ r'github.com/[^/]+/([^/]+)/archive',
r'/([^/]+)[_.-]v?%s' % ver,
r'/([^/]+)%s' % ver,
r'^([^/]+)[_.-]v?%s' % ver,
diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py
index ca98160bdd..2b8b05eb28 100644
--- a/lib/spack/spack/util/compression.py
+++ b/lib/spack/spack/util/compression.py
@@ -39,6 +39,9 @@ def allowed_archive(path):
def decompressor_for(path):
"""Get the appropriate decompressor for a path."""
+ if path.endswith(".zip"):
+ unzip = which('unzip', required=True)
+ return unzip
tar = which('tar', required=True)
tar.add_default_arg('-xf')
return tar