5 , oldest-supported-numpy
18 assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
22 mpiSupport = hdf5.mpiSupport;
23 in buildPythonPackage rec {
28 disabled = pythonOlder "3.7";
31 inherit pname version;
32 hash = "sha256-2TrcSM7rMzR+skpjT7eH78euRkTm6kunM9CZYFBFwEk=";
35 # avoid strict pinning of numpy
37 substituteInPlace setup.py \
38 --replace "mpi4py ==" "mpi4py >="
42 HDF5_MPI = if mpiSupport then "ON" else "OFF";
45 # Needed to run the tests reliably. See:
46 # https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
47 ${lib.optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
50 preBuild = lib.optionalString mpiSupport "export CC=${lib.getDev mpi}/bin/mpicc";
54 oldest-supported-numpy
60 buildInputs = [ hdf5 ]
61 ++ lib.optional mpiSupport mpi;
63 propagatedBuildInputs = [ numpy ]
64 ++ lib.optionals mpiSupport [ mpi4py openssh ]
65 ++ lib.optionals (pythonOlder "3.8") [ cached-property ];
67 # tests now require pytest-mpi, which isn't available and difficult to package
69 nativeCheckInputs = [ pytestCheckHook openssh ];
71 pythonImportsCheck = [ "h5py" ];
74 changelog = "https://github.com/h5py/h5py/blob/${version}/docs/whatsnew/${lib.versions.majorMinor version}.rst";
75 description = "Pythonic interface to the HDF5 binary data format";
76 homepage = "http://www.h5py.org/";
77 license = licenses.bsd3;