1{ lib
2, aiolimiter
3, apscheduler
4, beautifulsoup4
5, buildPythonPackage
6, cachetools
7, cryptography
8, fetchFromGitHub
9, flaky
10, httpx
11, pytest-asyncio
12, pytest-timeout
13, pytest-xdist
14, pytestCheckHook
15, pythonOlder
16, pytz
17, tornado
18}:
19
20buildPythonPackage rec {
21 pname = "python-telegram-bot";
22 version = "20.2";
23 format = "setuptools";
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchFromGitHub {
28 owner = pname;
29 repo = pname;
30 rev = "refs/tags/v${version}";
31 hash = "sha256-OdjTlVUjlw+5K/kvL1Yx+7c/lIE52udUo6Ux18M9xmE=";
32 };
33
34 propagatedBuildInputs = [
35 aiolimiter
36 apscheduler
37 cachetools
38 cryptography
39 httpx
40 pytz
41 ]
42 ++ httpx.optional-dependencies.socks
43 ++ httpx.optional-dependencies.http2;
44
45 nativeCheckInputs = [
46 beautifulsoup4
47 flaky
48 pytest-asyncio
49 pytest-timeout
50 pytest-xdist
51 pytestCheckHook
52 tornado
53 ];
54
55 pythonImportsCheck = [
56 "telegram"
57 ];
58
59 disabledTests = [
60 # Tests require network access
61 "TestAIO"
62 "TestAnimation"
63 "TestApplication"
64 "TestAudio"
65 "TestBase"
66 "TestBot"
67 "TestCallback"
68 "TestChat"
69 "TestChosenInlineResult"
70 "TestCommandHandler"
71 "TestConstants"
72 "TestContact"
73 "TestConversationHandler"
74 "TestDice"
75 "TestDict"
76 "TestDocument"
77 "TestFile"
78 "TestForceReply"
79 "TestForum"
80 "TestGame"
81 "TestGet"
82 "TestHTTP"
83 "TestInline"
84 "TestInput"
85 "TestInvoice"
86 "TestJob"
87 "TestKeyboard"
88 "TestLocation"
89 "TestMask"
90 "TestMenu"
91 "TestMessage"
92 "TestMeta"
93 "TestOrder"
94 "TestPassport"
95 "TestPhoto"
96 "TestPickle"
97 "TestPoll"
98 "TestPre"
99 "TestPrefix"
100 "TestProximity"
101 "TestReply"
102 "TestRequest"
103 "TestSend"
104 "TestSent"
105 "TestShipping"
106 "TestSlot"
107 "TestSticker"
108 "TestString"
109 "TestSuccess"
110 "TestTelegram"
111 "TestType"
112 "TestUpdate"
113 "TestUser"
114 "TestVenue"
115 "TestVideo"
116 "TestVoice"
117 "TestWeb"
118 ];
119
120 meta = with lib; {
121 description = "Python library to interface with the Telegram Bot API";
122 homepage = "https://python-telegram-bot.org";
123 changelog = "https://github.com/python-telegram-bot/python-telegram-bot/blob/v${version}/CHANGES.rst";
124 license = licenses.lgpl3Only;
125 maintainers = with maintainers; [ veprbl pingiun ];
126 };
127}