diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-06-27 09:47:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-27 09:47:17 -0700 |
commit | bf4eeb48b959f6236e05c25b2d3b4d14609ebe65 (patch) | |
tree | 50b31caa04c52c837a861364d08f464909fa43f9 /var | |
parent | 76458f5bfcde186c38dcef3259a3d091b85c4d9f (diff) | |
parent | d566510a400e1067b8662dfdb00d3d3ec7e43b2f (diff) | |
download | spack-bf4eeb48b959f6236e05c25b2d3b4d14609ebe65.tar.gz spack-bf4eeb48b959f6236e05c25b2d3b4d14609ebe65.tar.bz2 spack-bf4eeb48b959f6236e05c25b2d3b4d14609ebe65.tar.xz spack-bf4eeb48b959f6236e05c25b2d3b4d14609ebe65.zip |
Merge pull request #1099 from adamjstewart/fixes/hdf5
Fix self-check for hdf5@1.10.0-patch1
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/package.py | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index e46f432be5..51a5823aa5 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -70,7 +70,8 @@ class Hdf5(Package): raise RuntimeError(msg) if '+threadsafe' in spec and ('+cxx' in spec or '+fortran' in spec): - raise RuntimeError("cannot use variant +threadsafe with either +cxx or +fortran") + msg = 'cannot use variant +threadsafe with either +cxx or +fortran' + raise RuntimeError(msg) def install(self, spec, prefix): self.validate(spec) @@ -164,7 +165,7 @@ int main(int argc, char **argv) { """ expected = """\ HDF5 version {version} {version} -""".format(version=str(spec.version)) +""".format(version=str(spec.version.up_to(3))) with open("check.c", 'w') as f: f.write(source) if '+mpi' in spec: @@ -185,24 +186,30 @@ HDF5 version {version} {version} if not success: print "Produced output does not match expected output." print "Expected output:" - print '-'*80 + print '-' * 80 print expected - print '-'*80 + print '-' * 80 print "Produced output:" - print '-'*80 + print '-' * 80 print output - print '-'*80 + print '-' * 80 raise RuntimeError("HDF5 install check failed") shutil.rmtree(checkdir) def url_for_version(self, version): - v = str(version) + base_url = "http://www.hdfgroup.org/ftp/HDF5/releases" if version == Version("1.2.2"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}.tar.gz".format(base_url, version) + elif version < Version("1.6.6"): + return "{0}/hdf5-{1}/hdf5-{2}.tar.gz".format( + base_url, version.up_to(2), version) elif version < Version("1.7"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format( + base_url, version.up_to(2), version) elif version < Version("1.10"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}/src/hdf5-{1}.tar.gz".format( + base_url, version) else: - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format( + base_url, version.up_to(2), version) |