Add py-h5py version 3.3.0 (#24781)

* Add py-h5py version 3.3.0

The mpi4py dependency was bumped to 3.0.2 in setup.py. I'm not sure if that's actually required or not, but nothing lower is still tested.

* Use environment variable to stop h5py using setuptools setup_requires feature

* Add myself as a maintainer for py-h5py
This commit is contained in:
Thomas Kluyver 2021-07-14 12:33:57 +01:00 committed by GitHub
parent 652f35a39f
commit c33ec328fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 28 deletions

View File

@ -1,21 +0,0 @@
diff -Naur h5py-3.1.0/setup.py h5py-3.1.0.patch/setup.py
--- h5py-3.1.0/setup.py 2020-11-06 14:25:11.000000000 +0000
+++ h5py-3.1.0.patch/setup.py 2021-03-04 20:12:19.913405154 +0000
@@ -49,14 +49,14 @@
f"Cython >=0.29; python_version<'3.8'",
f"Cython >=0.29.14; python_version>='3.8'",
] + [
- f"numpy =={np_min}; python_version{py_condition}"
+ f"numpy >={np_min}; python_version{py_condition}"
for np_min, py_condition in NUMPY_MIN_VERSIONS
]
if setup_configure.mpi_enabled():
RUN_REQUIRES.append('mpi4py >=3.0.0')
- SETUP_REQUIRES.append("mpi4py ==3.0.0; python_version<'3.8'")
- SETUP_REQUIRES.append("mpi4py ==3.0.3; python_version>='3.8'")
+ SETUP_REQUIRES.append("mpi4py >=3.0.0; python_version<'3.8'")
+ SETUP_REQUIRES.append("mpi4py >=3.0.3; python_version>='3.8'")
# Set the environment variable H5PY_SETUP_REQUIRES=0 if we need to skip
# setup_requires for any reason.

View File

@ -11,11 +11,12 @@ class PyH5py(PythonPackage):
HDF5 library from Python."""
homepage = "http://www.h5py.org/"
pypi = "h5py/h5py-3.2.1.tar.gz"
pypi = "h5py/h5py-3.3.0.tar.gz"
git = "https://github.com/h5py/h5py.git"
maintainers = ['bryanherman']
maintainers = ['bryanherman', 'takluyver']
version('master', branch='master')
version('3.3.0', sha256='e0dac887d779929778b3cfd13309a939359cc9e74756fc09af7c527a82797186')
version('3.2.1', sha256='89474be911bfcdb34cbf0d98b8ec48b578c27a89fdb1ae4ee7513f1ef8d9249e')
version('3.2.0', sha256='4271c1a4b7d87aa76fe96d016368beb05a6c389d64882d58036964ce7d2d03c1')
version('3.1.0', sha256='1e2516f190652beedcb8c7acfa1c6fa92d99b42331cbef5e5c7ec2d65b0fc3c2')
@ -61,13 +62,10 @@ class PyH5py(PythonPackage):
depends_on('hdf5+mpi', when='+mpi')
depends_on('mpi', when='+mpi')
depends_on('py-mpi4py', when='@:2.99 +mpi', type=('build', 'run'))
depends_on('py-mpi4py@3.0.0:', when='@3.0.0:+mpi^python@3.0.0:3.7.99', type=('build', 'run'))
depends_on('py-mpi4py@3.0.0:', when='@3.0.0:3.2.99+mpi^python@3.0.0:3.7.99', type=('build', 'run'))
depends_on('py-mpi4py@3.0.2:', when='@3.3.0:+mpi^python@3.0.0:3.7.99', type=('build', 'run'))
depends_on('py-mpi4py@3.0.3:', when='@3.0.0:+mpi^python@3.8.0:', type=('build', 'run'))
# For version 3+, patch setup.py to allow setup_requires list to be more abstract.
# Required for offline installations with version 3+
patch('h5py-3-setuprequires.patch', when="@3.0.0:")
phases = ['configure', 'install']
def setup_build_environment(self, env):
@ -76,6 +74,10 @@ def setup_build_environment(self, env):
env.set('CC', self.spec['mpi'].mpicc)
env.set('HDF5_MPI', 'ON')
# Disable build requirements meant for Python build tools, which pin
# versions of numpy & mpi4py.
env.set('H5PY_SETUP_REQUIRES', '0')
@when('@3.0.0:')
def configure(self, spec, prefix):
pass