Files
nixpkgs/pkgs/development/python-modules/mpi4py/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

73 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
cython,
setuptools,
mpi,
toPythonModule,
pytestCheckHook,
mpiCheckPhaseHook,
}:
buildPythonPackage rec {
pname = "mpi4py";
version = "4.1.0";
pyproject = true;
src = fetchFromGitHub {
repo = "mpi4py";
owner = "mpi4py";
tag = version;
hash = "sha256-Hm+x79utOrjAbprud2MECgakyOzgShSwNuoyZUcTluQ=";
};
build-system = [
cython
setuptools
];
nativeBuildInputs = [
mpi
];
dependencies = [
# Use toPythonModule so that also the mpi executables will be propagated to
# generated Python environment.
(toPythonModule mpi)
];
pythonImportsCheck = [ "mpi4py" ];
nativeCheckInputs = [
pytestCheckHook
mpiCheckPhaseHook
];
disabledTestPaths = lib.optionals (mpi.pname == "mpich") [
# These tests from some reason cause pytest to crash, and therefor it is
# hard to debug them. Upstream mentions these tests to raise issues in
# https://github.com/mpi4py/mpi4py/issues/418 but the workaround suggested
# there (setting MPI4PY_RC_RECV_MPROBE=0) doesn't work.
"test/test_util_pool.py"
"demo/futures/test_futures.py"
];
__darwinAllowLocalNetworking = true;
# skip spawn related tests for openmpi implemention
# see https://github.com/mpi4py/mpi4py/issues/545#issuecomment-2343011460
env.MPI4PY_TEST_SPAWN = if mpi.pname == "openmpi" then 0 else 1;
passthru = {
inherit mpi;
};
meta = {
description = "Python bindings for the Message Passing Interface standard";
homepage = "https://github.com/mpi4py/mpi4py";
changelog = "https://github.com/mpi4py/mpi4py/blob/${src.tag}/CHANGES.rst";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ doronbehar ];
};
}