about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/execnet/default.nix
blob: 528e849290db97992927829c4ee6d2bfa1f58e81 (plain) (blame)
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
67
68
69
{ lib
, buildPythonPackage
, isPyPy
, fetchPypi
, fetchpatch
, pytestCheckHook
, setuptools-scm
, apipkg
, py
}:

buildPythonPackage rec {
  pname = "execnet";
  version = "1.9.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5";
  };

  patches = [
    (fetchpatch {
      # Fix test compat with pytest 7.2.0
      url = "https://github.com/pytest-dev/execnet/commit/c0459b92bc4a42b08281e69b8802d24c5d3415d4.patch";
      hash = "sha256-AT2qr7AUpFXcPps525U63A7ARcEVmf0HM6ya73Z2vi0=";
    })
  ];

  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
  '';

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    apipkg
  ];

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

  nativeCheckInputs = [
    py # no longer required with 1.10.0
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "execnet"
  ];

  __darwinAllowLocalNetworking = true;

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