summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aiobtclientapi/default.nix
blob: 0bd02787190519694f6e0ff2b2a07724d36c41fb (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
{
  lib,
  buildPythonPackage,
  fetchFromGitea,
  aiobtclientrpc,
  async-timeout,
  httpx,
  torf,
  pytest-asyncio,
  pytest-mock,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage (finalAttrs: {
  pname = "aiobtclientapi";
  version = "1.1.4";
  pyproject = true;

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "plotski";
    repo = "aiobtclientapi";
    tag = "v${finalAttrs.version}";
    hash = "sha256-ga3EyKhfdEKkjFktUlgLSX54QbTc/a48vmWjmRqa+4w=";
  };

  pythonRelaxDeps = [
    "async-timeout"
  ];

  build-system = [
    setuptools
  ];

  dependencies = [
    aiobtclientrpc
    async-timeout
    httpx
    torf
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-mock
    pytestCheckHook
  ];

  pythonImportsCheck = [ "aiobtclientapi" ];

  disabledTests = [
    # Timing-sensitive, e.g. "AssertionError: assert 9 <= 7"
    "test_Monitor_block_until_timeout"
  ];

  disabledTestPaths = [
    # AttributeError
    "tests/clients_test/rtorrent_test/rtorrent_api_test.py"
  ];

  meta = {
    description = "Asynchronous high-level communication with BitTorrent clients";
    homepage = "https://aiobtclientapi.readthedocs.io";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ambroisie ];
  };
})