2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-25 19:13:59 +01:00
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
2020-05-03 19:51:49 +01:00
|
|
|
, decorator
|
2018-10-25 19:13:59 +01:00
|
|
|
, future
|
|
|
|
, urllib3
|
|
|
|
, tornado
|
|
|
|
, pytest
|
2020-05-03 20:26:54 +01:00
|
|
|
, isPy3k
|
2018-10-25 19:13:59 +01:00
|
|
|
}:
|
2018-01-18 16:22:53 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-telegram-bot";
|
2020-11-29 14:04:40 +00:00
|
|
|
version = "13.0";
|
2020-05-03 20:26:54 +01:00
|
|
|
disabled = !isPy3k;
|
2018-01-18 16:22:53 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:40 +00:00
|
|
|
sha256 = "ca78a41626d728a8f51affa792270e210fa503ed298d395bed2bd1281842dca3";
|
2018-01-18 16:22:53 +00:00
|
|
|
};
|
|
|
|
|
2018-10-25 19:13:59 +01:00
|
|
|
checkInputs = [ pytest ];
|
2020-05-03 19:51:49 +01:00
|
|
|
propagatedBuildInputs = [ certifi future urllib3 tornado decorator ];
|
|
|
|
|
2020-05-03 20:27:29 +01:00
|
|
|
# --with-upstream-urllib3 is not working properly
|
|
|
|
postPatch = ''
|
|
|
|
rm -rf telegram/vendor
|
|
|
|
'';
|
|
|
|
setupPyGlobalFlags = "--with-upstream-urllib3";
|
2018-01-20 23:03:35 +00:00
|
|
|
|
2018-10-25 19:13:59 +01:00
|
|
|
# tests not included with release
|
2018-01-20 23:03:35 +00:00
|
|
|
doCheck = false;
|
2020-05-03 19:51:49 +01:00
|
|
|
pythonImportsCheck = [ "telegram" ];
|
2018-01-18 16:22:53 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-01-18 16:22:53 +00:00
|
|
|
description = "This library provides a pure Python interface for the Telegram Bot API.";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://python-telegram-bot.org";
|
2018-01-18 16:22:53 +00:00
|
|
|
license = licenses.lgpl3;
|
2020-01-24 19:38:27 +00:00
|
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
2018-01-18 16:22:53 +00:00
|
|
|
};
|
|
|
|
}
|