1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 flit-core,
7 psutil,
8 pytestCheckHook,
9 pythonOlder,
10 pyyaml,
11 pyzmq,
12 tornado,
13}:
14
15buildPythonPackage rec {
16 pname = "circus";
17 version = "0.18.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-GTzoIk4GjO1mckz0gxBvtmdLUaV1g6waDn7Xp+6Mcas=";
25 };
26
27 build-system = [ flit-core ];
28
29 dependencies = [
30 psutil
31 pyzmq
32 tornado
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 pyyaml
38 ];
39
40 # On darwin: Too many open files
41 preCheck = lib.optionalString stdenv.isDarwin ''
42 ulimit -n 1024
43 '';
44
45 disabledTests = [
46 # these tests raise circus.tests.support.TimeoutException
47 "test_add_start"
48 "test_add"
49 "test_command_already_running"
50 "test_dummy"
51 "test_exits_within_graceful_timeout"
52 "test_full_stats"
53 "test_handler"
54 "test_handler"
55 "test_inherited"
56 "test_kills_after_graceful_timeout"
57 "test_launch_cli"
58 "test_max_age"
59 "test_reload_sequential"
60 "test_reload_uppercase"
61 "test_reload_wid_1_worker"
62 "test_reload_wid_4_workers"
63 "test_reload1"
64 "test_reload2"
65 "test_resource_watcher_max_cpu"
66 "test_resource_watcher_max_mem_abs"
67 "test_resource_watcher_max_mem"
68 "test_resource_watcher_min_cpu"
69 "test_resource_watcher_min_mem_abs"
70 "test_resource_watcher_min_mem"
71 "test_set_before_launch"
72 "test_set_by_arbiter"
73 "test_signal"
74 "test_stdin_socket"
75 "test_stop_and_restart"
76 "test_stream"
77 "test_venv"
78 "test_watchdog_discovery_found"
79 "test_watchdog_discovery_not_found"
80 # this test requires socket communication
81 "test_plugins"
82 ];
83
84 pythonImportsCheck = [ "circus" ];
85
86 meta = with lib; {
87 description = "Process and socket manager";
88 homepage = "https://github.com/circus-tent/circus";
89 changelog = "https://github.com/circus-tent/circus/releases/tag/${version}";
90 license = licenses.asl20;
91 maintainers = [ ];
92 };
93}