diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index 47873be56b622..cd60ecd9100a4 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -35,11 +35,13 @@ buildPythonPackage rec { pythonRelaxDeps = [ "mpi4py" ]; - # avoid strict pinning of numpy, can't be replaced with pythonRelaxDepsHook, - # see: https://github.com/NixOS/nixpkgs/issues/327941 + # avoid strict pinning of numpy and mpi4py, can't be replaced with + # pythonRelaxDepsHook, see: https://github.com/NixOS/nixpkgs/issues/327941 postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "numpy >=2.0.0, <3" "numpy" + substituteInPlace setup.py \ + --replace-fail "mpi4py ==3.1.6" "mpi4py" ''; env = { diff --git a/pkgs/development/python-modules/h5py/mpi4py-requirement.patch b/pkgs/development/python-modules/h5py/mpi4py-requirement.patch deleted file mode 100644 index b32e804ebe5ff..0000000000000 --- a/pkgs/development/python-modules/h5py/mpi4py-requirement.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index b1463422..7f0c7b10 100755 ---- a/setup.py -+++ b/setup.py -@@ -47,7 +47,7 @@ if setup_configure.mpi_enabled(): - # incompatible with newer setuptools. - RUN_REQUIRES.append('mpi4py >=3.1.1') - SETUP_REQUIRES.append("mpi4py ==3.1.1; python_version<'3.11'") -- SETUP_REQUIRES.append("mpi4py ==3.1.4; python_version>='3.11'") -+ SETUP_REQUIRES.append("mpi4py >=3.1.4; python_version>='3.11'") - - # Set the environment variable H5PY_SETUP_REQUIRES=0 if we need to skip - # setup_requires for any reason.