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