1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 sybil,
7 pytest,
8 pytestCheckHook,
9 mpi,
10 mpi4py,
11}:
12
13buildPythonPackage rec {
14 pname = "pytest-mpi";
15 version = "0.6";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "aragilar";
20 repo = "pytest-mpi";
21 rev = "v${version}";
22 hash = "sha256-m3HTGLoPnYeg0oeIA1nzTzch7FtkuXTYpox4rRgo5MU=";
23 };
24
25 build-system = [
26 setuptools
27 ];
28 buildInputs = [
29 # Don't propagate it to let a different pytest version be used if needed
30 pytest
31 ];
32 dependencies = [
33 sybil
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 mpi
39 mpi4py
40 ];
41 # Tests cause the Python interpreter to crash from some reason, a hard issue
42 # to debug. (TODO: discuss this with upstream)
43 doCheck = false;
44 pytestFlags = [
45 # https://github.com/aragilar/pytest-mpi/issues/4#issuecomment-634614337
46 "-ppytester"
47 ];
48
49 pythonImportsCheck = [ "pytest_mpi" ];
50
51 meta = {
52 description = "Pytest plugin for working with MPI";
53 homepage = "https://github.com/aragilar/pytest-mpi";
54 license = lib.licenses.bsd3;
55 maintainers = with lib.maintainers; [ doronbehar ];
56 };
57}