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