1{ lib
2, APScheduler
3, buildPythonPackage
4, cachetools
5, certifi
6, decorator
7, fetchPypi
8, future
9, tornado
10, urllib3
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "python-telegram-bot";
16 version = "13.8.1";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "sha256-sGaR5Vw1lDJn7mNtmqcCs1eRVdLzLg4tbX8R8LXnJ/A=";
24 };
25
26 propagatedBuildInputs = [
27 APScheduler
28 cachetools
29 certifi
30 decorator
31 future
32 tornado
33 urllib3
34 ];
35
36 # --with-upstream-urllib3 is not working properly
37 postPatch = ''
38 rm -r telegram/vendor
39
40 substituteInPlace requirements.txt \
41 --replace "APScheduler==3.6.3" "APScheduler" \
42 --replace "cachetools==4.2.2" "cachetools"
43 '';
44
45 setupPyGlobalFlags = "--with-upstream-urllib3";
46
47 # tests not included with release
48 doCheck = false;
49
50 pythonImportsCheck = [
51 "telegram"
52 ];
53
54 meta = with lib; {
55 description = "Python library to interface with the Telegram Bot API";
56 homepage = "https://python-telegram-bot.org";
57 license = licenses.lgpl3Only;
58 maintainers = with maintainers; [ veprbl pingiun ];
59 };
60}