1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitea,
5 async-timeout,
6 httpx,
7 httpx-socks,
8 proxy-py,
9 pytest-asyncio,
10 pytest-mock,
11 pytestCheckHook,
12 python-socks,
13 rencode,
14 setuptools,
15}:
16
17buildPythonPackage rec {
18 pname = "aiobtclientrpc";
19 version = "5.0.1";
20 pyproject = true;
21
22 src = fetchFromGitea {
23 domain = "codeberg.org";
24 owner = "plotski";
25 repo = "aiobtclientrpc";
26 tag = "v${version}";
27 hash = "sha256-2nBrIMlYUI4PwirkiSJSkw5zw2Kc/KoVRyIIYYx4iYs=";
28 };
29
30 pythonRelaxDeps = [
31 "async-timeout"
32 ];
33
34 build-system = [
35 setuptools
36 ];
37
38 dependencies = [
39 async-timeout
40 httpx
41 httpx-socks
42 python-socks
43 rencode
44 ]
45 ++ python-socks.optional-dependencies.asyncio;
46
47 nativeCheckInputs = [
48 proxy-py
49 pytest-asyncio
50 pytest-mock
51 pytestCheckHook
52 ];
53
54 disabledTests = [
55 # Missing lambda parameter
56 "test_add_event_handler_with_autoremove"
57 # Try to use `htpasswd` and `nginx` with hard-coded paths
58 "test_authentication_error[rtorrent_http]"
59 "test_api_as_context_manager[rtorrent_http]"
60 "test_add_and_remove_torrents[rtorrent_http-paused]"
61 "test_add_and_remove_torrents[rtorrent_http-started]"
62 "test_proxy[rtorrent_http-http_proxy]"
63 "test_timeout[rtorrent_http]"
64 "test_event_subscriptions_survive_reconnecting[rtorrent_http]"
65 "test_waiting_for_event[rtorrent_http]"
66 ];
67
68 pythonImportsCheck = [ "aiobtclientrpc" ];
69
70 meta = {
71 description = "Asynchronous low-level communication with BitTorrent clients";
72 homepage = "https://aiobtclientrpc.readthedocs.io";
73 license = lib.licenses.gpl3Plus;
74 maintainers = with lib.maintainers; [ ambroisie ];
75 };
76}