py-h5py: HDF5_DIR is needed for ~mpi too (#20905)

For the `~mpi` variant, the environment variable `HDF5_DIR` is still required.  I moved this command out of the `+mpi` conditional.
This commit is contained in:
Kelly (KT) Thompson 2021-01-14 11:27:04 -07:00 committed by GitHub
parent 89fd0faa40
commit 040f69f931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,10 +54,10 @@ class PyH5py(PythonPackage):
phases = ['configure', 'install']
def setup_build_environment(self, env):
env.set('HDF5_DIR', self.spec['hdf5'].prefix)
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):