Unverified Commit e3a7cda7 authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

python312Packages.h5py-mpi: fix build by relaxing mpi4py dependency (#353635)

parents 82717b44 a0df5569
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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 = {
+0 −13
Original line number Diff line number Diff line
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.