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