summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSajid Ali <sajidsyed2021@u.northwestern.edu>2021-01-02 17:32:36 -0600
committerGitHub <noreply@github.com>2021-01-02 17:32:36 -0600
commitd685e47fb7dd2787f25415e515102135b05789ae (patch)
tree0199349e9d649df9b61cec5e72a4082d5c5d4383
parenta8ccb8e116a1abfaa1d7ecb4e84f9f14ebab12ad (diff)
downloadspack-d685e47fb7dd2787f25415e515102135b05789ae.tar.gz
spack-d685e47fb7dd2787f25415e515102135b05789ae.tar.bz2
spack-d685e47fb7dd2787f25415e515102135b05789ae.tar.xz
spack-d685e47fb7dd2787f25415e515102135b05789ae.zip
bump py-h5py (#20482)
* rebase and fix merge conflict * address reviewer comments * rework dependency handling as per reviewer comments * incorporate reviewer feedback * incorporate reviewer feedback * fix phases * address reviewer comments * minor
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py28
1 files changed, 22 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index d972c37f8e..21105c08c4 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -11,10 +11,12 @@ class PyH5py(PythonPackage):
HDF5 library from Python."""
homepage = "http://www.h5py.org/"
- pypi = "h5py/h5py-2.10.0.tar.gz"
+ pypi = "h5py/h5py-3.1.0.tar.gz"
git = "https://github.com/h5py/h5py.git"
version('master', branch='master')
+ version('3.1.0', sha256='1e2516f190652beedcb8c7acfa1c6fa92d99b42331cbef5e5c7ec2d65b0fc3c2')
+ version('3.0.0', sha256='7d3803be1b530c68c2955faba726dc0f591079b68941a0c0269b5384a42ab519')
version('2.10.0', sha256='84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d')
version('2.9.0', sha256='9d41ca62daf36d6b6515ab8765e4c8c4388ee18e2a665701fef2b41563821002')
version('2.8.0', sha256='e626c65a8587921ebc7fb8d31a49addfdd0b9a9aa96315ea484c09803337b955')
@@ -26,18 +28,23 @@ class PyH5py(PythonPackage):
variant('mpi', default=True, description='Build with MPI support')
+ # Python versions
+ depends_on('python@3.6:', type=('build', 'run'), when='@3.0.0:')
+
# Build dependencies
- depends_on('py-cython@0.23:', type='build')
+ depends_on('py-cython@0.23:', type='build', when='@:2.99')
+ depends_on('py-cython@0.29:', type=('build'), when='@3.0.0:')
depends_on('py-pkgconfig', type='build')
depends_on('py-setuptools', type='build')
# Build and runtime dependencies
depends_on('py-cached-property@1.5:', type=('build', 'run'))
depends_on('py-numpy@1.7:', type=('build', 'run'))
- depends_on('py-six', type=('build', 'run'))
+ depends_on('py-six', type=('build', 'run'), when='@:2.99')
# Link dependencies
- depends_on('hdf5@1.8.4:+hl')
+ depends_on('hdf5@1.8.4:1.11+hl', when='@:2.99')
+ depends_on('hdf5@1.8.4:+hl', when='@3.0.0:')
# MPI dependencies
depends_on('hdf5+mpi', when='+mpi')
@@ -46,10 +53,19 @@ class PyH5py(PythonPackage):
phases = ['configure', 'install']
+ def setup_build_environment(self, env):
+ if '+mpi' in self.spec:
+ env.set('CC', self.spec['mpi'].mpicc)
+ env.set('HDF5_MPI', 'ON')
+ env.set('HDF5_DIR', self.spec['hdf5'].prefix)
+
+ @when('@3.0.0:')
+ def configure(self, spec, prefix):
+ pass
+
+ @when('@:2.99')
def configure(self, spec, prefix):
self.setup_py('configure', '--hdf5={0}'.format(spec['hdf5'].prefix),
'--hdf5-version={0}'.format(spec['hdf5'].version))
-
if '+mpi' in spec:
- env['CC'] = spec['mpi'].mpicc
self.setup_py('configure', '--mpi')