2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
2020-05-15 21:57:56 +00:00
|
|
|
, decorator
|
2020-04-24 23:36:52 +00:00
|
|
|
, future
|
|
|
|
, urllib3
|
|
|
|
, tornado
|
|
|
|
, pytest
|
2020-05-15 21:57:56 +00:00
|
|
|
, isPy3k
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-telegram-bot";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "13.0";
|
2020-05-15 21:57:56 +00:00
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "ca78a41626d728a8f51affa792270e210fa503ed298d395bed2bd1281842dca3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
propagatedBuildInputs = [ certifi future urllib3 tornado decorator ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
# --with-upstream-urllib3 is not working properly
|
|
|
|
postPatch = ''
|
|
|
|
rm -rf telegram/vendor
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2020-05-15 21:57:56 +00:00
|
|
|
setupPyGlobalFlags = "--with-upstream-urllib3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# tests not included with release
|
|
|
|
doCheck = false;
|
2020-05-15 21:57:56 +00:00
|
|
|
pythonImportsCheck = [ "telegram" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "This library provides a pure Python interface for the Telegram Bot API.";
|
|
|
|
homepage = "https://python-telegram-bot.org";
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
|
|
|
};
|
|
|
|
}
|