1{
2 lib,
3 buildPythonPackage,
4 isPyPy,
5 fetchPypi,
6 hatchling,
7 hatch-vcs,
8 gevent,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "execnet";
14 version = "2.1.1";
15 pyproject = true;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-UYm1LGEhwk/q4ogWarQbMlScfiNIZSc2VAuebn1OcuM=";
20 };
21
22 postPatch = ''
23 # remove vbox tests
24 rm testing/test_termination.py
25 rm testing/test_channel.py
26 rm testing/test_xspec.py
27 rm testing/test_gateway.py
28 ''
29 + lib.optionalString isPyPy ''
30 rm testing/test_multi.py
31 '';
32
33 build-system = [
34 hatchling
35 hatch-vcs
36 ];
37
38 # sometimes crashes with: OSError: [Errno 9] Bad file descriptor
39 doCheck = !isPyPy;
40
41 nativeCheckInputs = [
42 gevent
43 pytestCheckHook
44 ];
45
46 disabledTests = [
47 # gets stuck
48 "test_popen_io"
49 # OSError: [Errno 9] Bad file descriptor
50 "test_stdouterrin_setnull"
51 ];
52
53 pytestFlags = [ "-vvv" ];
54
55 pythonImportsCheck = [ "execnet" ];
56
57 __darwinAllowLocalNetworking = true;
58
59 meta = {
60 description = "Distributed Python deployment and communication";
61 homepage = "https://execnet.readthedocs.io/";
62 changelog = "https://github.com/pytest-dev/execnet/blob/v${version}/CHANGELOG.rst";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ getchoo ];
65 };
66}