diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 21105c08c4..39b352e4ae 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -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):