1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 cython,
6 setuptools,
7 mpi,
8 openssh,
9 pytestCheckHook,
10 mpiCheckPhaseHook,
11}:
12
13buildPythonPackage rec {
14 pname = "mpi4py";
15 # See https://github.com/mpi4py/mpi4py/issues/386 . Part of the changes since
16 # the last release include Python 3.12 fixes.
17 version = "3.1.6-unstable-2024-07-08";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 repo = "mpi4py";
22 owner = "mpi4py";
23 rev = "e9a59719bbce1b9c351e1e30ecd3be3b459e97cd";
24 hash = "sha256-C/nidWGr8xsLV73u7HRtnXoQgYmoRJkD45DFrdXXTPI=";
25 };
26
27 build-system = [
28 cython
29 setuptools
30 mpi
31 ];
32 dependencies = [
33 mpi
34 ];
35
36 __darwinAllowLocalNetworking = true;
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 openssh
41 mpiCheckPhaseHook
42 ];
43 # Most tests pass, (besides `test_spawn.py`), but when reaching ~80% tests
44 # progress, an orted process hangs and the tests don't finish. This issue is
45 # probably due to the sandbox.
46 doCheck = false;
47 disabledTestPaths = [
48 # Almost all tests in this file fail (TODO: Report about this upstream..)
49 "test/test_spawn.py"
50 ];
51
52 passthru = {
53 inherit mpi;
54 };
55
56 meta = {
57 description = "Python bindings for the Message Passing Interface standard";
58 homepage = "https://github.com/mpi4py/mpi4py";
59 license = lib.licenses.bsd2;
60 maintainers = with lib.maintainers; [ doronbehar ];
61 };
62}