Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / python-telegram-bot / default.nix
blobb5155fd4bb655c532855ffb6e8fa856269f5a0f8
1 { lib
2 , APScheduler
3 , buildPythonPackage
4 , certifi
5 , decorator
6 , fetchPypi
7 , future
8 , isPy3k
9 , tornado
10 , urllib3
13 buildPythonPackage rec {
14   pname = "python-telegram-bot";
15   version = "13.4.1";
16   disabled = !isPy3k;
18   src = fetchPypi {
19     inherit pname version;
20     sha256 = "141w3701jjl460702xddqvi3hswp24jnkl6cakvz2aqrmcyxq7sc";
21   };
23   propagatedBuildInputs = [
24     APScheduler
25     certifi
26     decorator
27     future
28     tornado
29     urllib3
30   ];
32   # --with-upstream-urllib3 is not working properly
33   postPatch = ''
34     rm -r telegram/vendor
36     substituteInPlace requirements.txt \
37       --replace 'APScheduler==3.6.3' 'APScheduler'
38   '';
40   setupPyGlobalFlags = "--with-upstream-urllib3";
42   # tests not included with release
43   doCheck = false;
44   pythonImportsCheck = [ "telegram" ];
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   };