diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index d1e0e0d45234..83eaf43ce68e 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/pkgs/development/python-modules/mpi4py/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, cython, setuptools, + stdenv, mpi, toPythonModule, pytest, @@ -52,6 +53,13 @@ buildPythonPackage rec { # see https://github.com/mpi4py/mpi4py/issues/545#issuecomment-2343011460 env.MPI4PY_TEST_SPAWN = if mpi.pname == "openmpi" then 0 else 1; + disabledTests = [ + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # testJoin calls socket.getaddrinfo(socket.gethostname(), ...) + "test_dynproc.TestDPM.testJoin" + ]; + # follow upstream's checkPhase # see https://github.com/mpi4py/mpi4py/blob/4.1.0/.github/workflows/ci-test.yml#L92-L95 checkPhase = '' @@ -60,7 +68,9 @@ buildPythonPackage rec { echo 'Testing mpi4py (np=1)' mpiexec -n 1 python test/main.py -v echo 'Testing mpi4py (np=2)' - mpiexec -n 2 python test/main.py -v -f -e spawn + mpiexec -n 2 python test/main.py -v -f -e spawn${ + lib.concatMapStrings (test: " -x ${test}") disabledTests + } runHook postCheck '';