Merge branch 'master' into zippackages

This commit is contained in:
Matthew LeGendre 2014-03-13 15:18:15 -07:00
commit 67203f17e0
3 changed files with 15 additions and 3 deletions

View File

@ -51,9 +51,11 @@ parser = argparse.ArgumentParser(
parser.add_argument('-V', '--version', action='version', parser.add_argument('-V', '--version', action='version',
version="%s" % spack.spack_version) version="%s" % spack.spack_version)
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose', 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', 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', parser.add_argument('-m', '--mock', action='store_true', dest='mock',
help="Use mock packages instead of real ones.") 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') mock_path = new_path(spack.module_path, 'test', 'mock_packages')
spack.packages_path = mock_path 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 # 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)
try: try:

View File

@ -23,6 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import os import os
import shutil
import argparse import argparse
import spack.packages as packages import spack.packages as packages
@ -78,7 +79,7 @@ def mirror(parser, args):
final_dst = new_path(pkg_path, basename) final_dst = new_path(pkg_path, basename)
os.chdir(working_dir) 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) tty.msg("Added %s to mirror" % final_dst)
finally: finally:

View File

@ -102,6 +102,9 @@ def parse_version_string_with_indices(path):
# e.g. https://github.com/petdance/ack/tarball/1.93_02 # e.g. https://github.com/petdance/ack/tarball/1.93_02
(r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path), (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) # e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
(r'[-_](R\d+[AB]\d*(-\d+)?)', path), (r'[-_](R\d+[AB]\d*(-\d+)?)', path),
@ -169,6 +172,7 @@ def parse_name(path, ver=None):
ntypes = (r'/sourceforge/([^/]+)/', ntypes = (r'/sourceforge/([^/]+)/',
r'/([^/]+)/(tarball|zipball)/', r'/([^/]+)/(tarball|zipball)/',
r'/([^/]+)[_.-](bin|dist|stable|src|sources)[_.-]%s' % ver, r'/([^/]+)[_.-](bin|dist|stable|src|sources)[_.-]%s' % ver,
r'github.com/[^/]+/([^/]+)/archive',
r'/([^/]+)[_.-]v?%s' % ver, r'/([^/]+)[_.-]v?%s' % ver,
r'/([^/]+)%s' % ver, r'/([^/]+)%s' % ver,
r'^([^/]+)[_.-]v?%s' % ver, r'^([^/]+)[_.-]v?%s' % ver,