From 4f6b37d15372cbed55aa1a1639fe0c025b0e2d23 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 17 Jul 2024 14:12:11 +0300 Subject: [PATCH] python312Packages.h5py-mpi: fix build --- pkgs/development/python-modules/h5py/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index 83108125d4ce..6a1dd926f07a 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -6,6 +6,7 @@ setuptools, numpy, hdf5, + pythonRelaxDepsHook, cython_0, pkgconfig, mpi4py ? null, @@ -45,6 +46,9 @@ buildPythonPackage rec { substituteInPlace pyproject.toml \ --replace-fail "numpy >=2.0.0rc1" "numpy" ''; + pythonRelaxDeps = [ + "mpi4py" + ]; HDF5_DIR = "${hdf5}"; HDF5_MPI = if mpiSupport then "ON" else "OFF"; @@ -58,6 +62,7 @@ buildPythonPackage rec { preBuild = lib.optionalString mpiSupport "export CC=${lib.getDev mpi}/bin/mpicc"; nativeBuildInputs = [ + pythonRelaxDepsHook cython_0 pkgconfig setuptools @@ -82,6 +87,10 @@ buildPythonPackage rec { preCheck = '' cd $out ''; + # For some reason these fail when mpi support is enabled, due to concurrent + # writings. There are a few open issues about this in the bug tracker, but + # not related to the tests. + disabledTests = lib.optionals mpiSupport [ "TestPageBuffering" ]; pythonImportsCheck = [ "h5py" ];