1{ lib
2, buildPythonPackage
3, cloudpickle
4, dill
5, fetchPypi
6, msgpack
7, pytestCheckHook
8, pythonAtLeast
9, serpent
10}:
11
12buildPythonPackage rec {
13 pname = "pyro4";
14 version = "4.82";
15 format = "setuptools";
16
17 # No support Python >= 3.11
18 # https://github.com/irmen/Pyro4/issues/246
19 disabled = pythonAtLeast "3.11";
20
21 src = fetchPypi {
22 pname = "Pyro4";
23 inherit version;
24 hash = "sha256-UR9bCATpLdd9wzrfnJR3h+P56cWpaxIWLwVXp8TOIfs=";
25 };
26
27 propagatedBuildInputs = [
28 serpent
29 ];
30
31 buildInputs = [
32 dill
33 cloudpickle
34 msgpack
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 ];
40
41 # add testsupport.py to PATH
42 preCheck = ''
43 PYTHONPATH=tests/PyroTests:$PYTHONPATH
44 '';
45
46 disabledTestPaths = [
47 # ignore network related tests, which fail in sandbox
48 "tests/PyroTests/test_naming.py"
49 ];
50
51 disabledTests = [
52 "StartNSfunc"
53 "Broadcast"
54 "GetIP"
55 ];
56
57 # otherwise the tests hang the build
58 __darwinAllowLocalNetworking = true;
59
60 pythonImportsCheck = [
61 "Pyro4"
62 ];
63
64 meta = with lib; {
65 description = "Distributed object middleware for Python (RPC)";
66 homepage = "https://github.com/irmen/Pyro4";
67 changelog = "https://github.com/irmen/Pyro4/releases/tag/${version}";
68 license = licenses.mit;
69 maintainers = with maintainers; [ prusnak ];
70 };
71}