2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2021-04-11 16:02:21 +02:00
|
|
|
, APScheduler
|
2018-10-25 20:13:59 +02:00
|
|
|
, buildPythonPackage
|
2021-06-08 21:46:27 +02:00
|
|
|
, cachetools
|
2018-10-25 20:13:59 +02:00
|
|
|
, certifi
|
2020-05-03 20:51:49 +02:00
|
|
|
, decorator
|
2021-04-11 16:02:21 +02:00
|
|
|
, fetchPypi
|
2018-10-25 20:13:59 +02:00
|
|
|
, future
|
2021-04-11 16:02:21 +02:00
|
|
|
, tornado
|
|
|
|
, urllib3
|
2021-06-08 21:46:27 +02:00
|
|
|
, pythonOlder
|
2018-10-25 20:13:59 +02:00
|
|
|
}:
|
2018-01-18 17:22:53 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-telegram-bot";
|
2021-07-02 13:46:56 +02:00
|
|
|
version = "13.7";
|
2021-06-08 21:46:27 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-01-18 17:22:53 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-07-02 13:46:56 +02:00
|
|
|
sha256 = "sha256-JN91RZ4zW5a6/6aZFnn4RL1CaXivWmnKQZoKxDpAYCw=";
|
2018-01-18 17:22:53 +01:00
|
|
|
};
|
|
|
|
|
2021-04-11 16:02:21 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
APScheduler
|
2021-06-08 21:46:27 +02:00
|
|
|
cachetools
|
2021-04-11 16:02:21 +02:00
|
|
|
certifi
|
|
|
|
decorator
|
|
|
|
future
|
|
|
|
tornado
|
|
|
|
urllib3
|
|
|
|
];
|
2020-05-03 20:51:49 +02:00
|
|
|
|
2020-05-03 21:27:29 +02:00
|
|
|
# --with-upstream-urllib3 is not working properly
|
|
|
|
postPatch = ''
|
2021-03-07 15:56:42 +01:00
|
|
|
rm -r telegram/vendor
|
|
|
|
|
|
|
|
substituteInPlace requirements.txt \
|
2021-10-12 21:48:20 +02:00
|
|
|
--replace "APScheduler==3.6.3" "APScheduler" \
|
|
|
|
--replace "cachetools==4.2.2" "cachetools"
|
2020-05-03 21:27:29 +02:00
|
|
|
'';
|
2021-04-11 16:02:21 +02:00
|
|
|
|
2020-05-03 21:27:29 +02:00
|
|
|
setupPyGlobalFlags = "--with-upstream-urllib3";
|
2018-01-21 00:03:35 +01:00
|
|
|
|
2018-10-25 20:13:59 +02:00
|
|
|
# tests not included with release
|
2018-01-21 00:03:35 +01:00
|
|
|
doCheck = false;
|
2021-10-12 21:48:20 +02:00
|
|
|
|
2020-05-03 20:51:49 +02:00
|
|
|
pythonImportsCheck = [ "telegram" ];
|
2018-01-18 17:22:53 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-04-11 16:02:21 +02:00
|
|
|
description = "Python library to interface with the Telegram Bot API";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://python-telegram-bot.org";
|
2021-03-07 15:56:42 +01:00
|
|
|
license = licenses.lgpl3Only;
|
2020-01-24 20:38:27 +01:00
|
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
2018-01-18 17:22:53 +01:00
|
|
|
};
|
|
|
|
}
|