From c3d9dda0e563c6254982a57434d51d9226b7bc56 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sat, 5 Nov 2016 00:27:17 +0100 Subject: libSplash: Add 1.6.0 Release (#2244) * libSplash: Add 1.6.0 Release Add the latest release of libSplash, version 1.6.0. * Fix flake8 checks (another loop inversion issue) --- lib/spack/spack/cmd/flake8.py | 28 +++++++++++++++------- .../repos/builtin/packages/libsplash/package.py | 1 + 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/cmd/flake8.py b/lib/spack/spack/cmd/flake8.py index 3893815855..a4c607a640 100644 --- a/lib/spack/spack/cmd/flake8.py +++ b/lib/spack/spack/cmd/flake8.py @@ -52,6 +52,9 @@ exemptions = { # Exempt lines with urls and descriptions from overlong line errors. 501: [r'^\s*homepage\s*=', r'^\s*url\s*=', + r'^\s*git\s*=', + r'^\s*svn\s*=', + r'^\s*hg\s*=', r'^\s*version\(.*\)', r'^\s*variant\(.*\)', r'^\s*depends_on\(.*\)', @@ -63,7 +66,7 @@ exemptions = { # exemptions applied to all files. r'.py$': { # Exempt lines with URLs from overlong line errors. - 501: [r'^(https?|file)\:'] + 501: [r'(https?|file)\:'] }, } @@ -74,26 +77,30 @@ exemptions = dict((re.compile(file_pattern), for file_pattern, error_dict in exemptions.items()) -def filter_file(source, dest): +def filter_file(source, dest, output=False): """Filter a single file through all the patterns in exemptions.""" with open(source) as infile: parent = os.path.dirname(dest) mkdirp(parent) with open(dest, 'w') as outfile: - for file_pattern, errors in exemptions.items(): - if not file_pattern.search(source): - continue + for line in infile: + line = line.rstrip() - for line in infile: - line = line.rstrip() + for file_pattern, errors in exemptions.items(): + if not file_pattern.search(source): + continue for code, patterns in errors.items(): for pattern in patterns: if pattern.search(line): line += (" # NOQA: ignore=%d" % code) break - outfile.write(line + '\n') + + oline = line + '\n' + outfile.write(oline) + if output: + sys.stdout.write(oline) def setup_parser(subparser): @@ -101,6 +108,9 @@ def setup_parser(subparser): '-k', '--keep-temp', action='store_true', help="Do not delete temporary directory where flake8 runs. " "Use for debugging, to see filtered files.") + subparser.add_argument( + '-o', '--output', action='store_true', + help="Send filtered files to stdout as well as temp files.") subparser.add_argument( '-r', '--root-relative', action='store_true', default=False, help="print root-relative paths (default is cwd-relative)") @@ -142,7 +152,7 @@ def flake8(parser, args): for filename in file_list: src_path = os.path.join(spack.prefix, filename) dest_path = os.path.join(temp, filename) - filter_file(src_path, dest_path) + filter_file(src_path, dest_path, args.output) # run flake8 on the temporary tree. with working_dir(temp): diff --git a/var/spack/repos/builtin/packages/libsplash/package.py b/var/spack/repos/builtin/packages/libsplash/package.py index b58d37e6ae..c87dae19be 100644 --- a/var/spack/repos/builtin/packages/libsplash/package.py +++ b/var/spack/repos/builtin/packages/libsplash/package.py @@ -41,6 +41,7 @@ class Libsplash(Package): git='https://github.com/ComputationalRadiationPhysics/libSplash.git') version('master', branch='master', git='https://github.com/ComputationalRadiationPhysics/libSplash.git') + version('1.6.0', 'c05bce95abfe1ae4cd9d9817acf58d94') version('1.5.0', 'c1efec4c20334242c8a3b6bfdc0207e3') version('1.4.0', '2de37bcef6fafa1960391bf44b1b50e0') version('1.3.1', '524580ba088d97253d03b4611772f37c') -- cgit v1.2.3-70-g09d2