Merge branch 'master' of https://lc.llnl.gov/stash/scm/scale/spack
This commit is contained in:
		@@ -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):
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user