summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/execnet/default.nix
blob: b83fbd7a75301a3a29b988af2e60794b7bfc89f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  lib,
  buildPythonPackage,
  isPyPy,
  fetchPypi,
  hatchling,
  hatch-vcs,
  gevent,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "execnet";
  version = "2.1.1";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-UYm1LGEhwk/q4ogWarQbMlScfiNIZSc2VAuebn1OcuM=";
  };

  postPatch = ''
    # remove vbox tests
    rm testing/test_termination.py
    rm testing/test_channel.py
    rm testing/test_xspec.py
    rm testing/test_gateway.py
  ''
  + lib.optionalString isPyPy ''
    rm testing/test_multi.py
  '';

  build-system = [
    hatchling
    hatch-vcs
  ];

  # sometimes crashes with: OSError: [Errno 9] Bad file descriptor
  doCheck = !isPyPy;

  nativeCheckInputs = [
    gevent
    pytestCheckHook
  ];

  disabledTests = [
    # gets stuck
    "test_popen_io"
    # OSError: [Errno 9] Bad file descriptor
    "test_stdouterrin_setnull"
  ];

  pytestFlags = [ "-vvv" ];

  pythonImportsCheck = [ "execnet" ];

  __darwinAllowLocalNetworking = true;

  meta = {
    description = "Distributed Python deployment and communication";
    homepage = "https://execnet.readthedocs.io/";
    changelog = "https://github.com/pytest-dev/execnet/blob/v${version}/CHANGELOG.rst";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ getchoo ];
  };
}