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