summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/kantoku/default.nix
blob: c16798ca151ce0fac85e3adee0673fba060ee8aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  pythonAtLeast,
  flit-core,
  gevent,
  mock,
  psutil,
  pytest-cov-stub,
  pytestCheckHook,
  pyyaml,
  pyzmq,
  tornado,
}:

buildPythonPackage (finalAttrs: {
  pname = "kantoku";
  version = "0.18.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bentoml";
    repo = "kantoku";
    tag = finalAttrs.version;
    hash = "sha256-pI79B7TDZwL4Jz5e7PDPIf8iIGiwCOKFI2jReUt8UNg=";
  };

  build-system = [ flit-core ];

  dependencies = [
    psutil
    pyzmq
    tornado
  ];

  nativeCheckInputs = [
    gevent
    mock
    pytest-cov-stub
    pytestCheckHook
    pyyaml
  ];

  pythonImportsCheck = [ "circus" ];

  disabledTests = [
    # AssertionError
    "test_streams"
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # Assertion error when test_socketstats hits a permission error
    "test_resource_watcher_max_mem"
    "test_resource_watcher_max_mem_abs"
  ]
  ++ lib.optionals (pythonAtLeast "3.14") [
    "test_help_invalid_command"
    "test_venv"
    "test_venv_site_packages"
    # Times out
    "test_handler"
  ];

  __darwinAllowLocalNetworking = true;

  meta = {
    description = "A Process & Socket Manager built with zmq";
    homepage = "https://github.com/bentoml/kantoku";
    changelog = "https://github.com/bentoml/kantoku/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ fab ];
  };
})