summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/aiobtclientrpc/default.nix
blob: 6a7aea15ef6b80813b3d1c28627dd12194a85e25 (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
75
76
77
78
{
  lib,
  async-timeout,
  buildPythonPackage,
  fetchFromCodeberg,
  httpx-socks,
  httpx,
  proxy-py,
  pytest-asyncio,
  pytest-cov-stub,
  pytest-mock,
  pytestCheckHook,
  python-socks,
  rencode,
  setuptools,
  tiny-proxy,
}:

buildPythonPackage (finalAttrs: {
  pname = "aiobtclientrpc";
  version = "6.0.1";
  pyproject = true;

  src = fetchFromCodeberg {
    owner = "plotski";
    repo = "aiobtclientrpc";
    tag = "v${finalAttrs.version}";
    hash = "sha256-4FWfzt+A9BY4nnaQU3xwdDFhuOMtfBFHYNoHaEOy7+0=";
  };

  pythonRelaxDeps = [ "async-timeout" ];

  build-system = [ setuptools ];

  dependencies = [
    async-timeout
    httpx
    httpx-socks
    python-socks
    rencode
  ];

  nativeCheckInputs = [
    proxy-py
    pytest-asyncio
    pytest-cov-stub
    pytest-mock
    pytestCheckHook
    tiny-proxy
  ];

  disabledTests = [
    # Missing lambda parameter
    "test_add_event_handler_with_autoremove"
    # Try to use `htpasswd` and `nginx` with hard-coded paths
    "test_authentication_error[rtorrent_http]"
    "test_api_as_context_manager[rtorrent_http]"
    "test_add_and_remove_torrents[rtorrent_http-paused]"
    "test_add_and_remove_torrents[rtorrent_http-started]"
    "test_proxy[rtorrent_http-http_proxy]"
    "test_timeout[rtorrent_http]"
    "test_event_subscriptions_survive_reconnecting[rtorrent_http]"
    "test_waiting_for_event[rtorrent_http]"
    "test_proxy[rtorrent_http-socks4_proxy]"
    "test_proxy[rtorrent_http-socks5_proxy]"
    # Tests are outdated
    "test_DelugeRPCRequest_equality"
  ];

  pythonImportsCheck = [ "aiobtclientrpc" ];

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