2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-04-12 18:23:04 +00:00
|
|
|
, APScheduler
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-06-28 23:13:55 +00:00
|
|
|
, cachetools
|
2020-04-24 23:36:52 +00:00
|
|
|
, certifi
|
2020-05-15 21:57:56 +00:00
|
|
|
, decorator
|
2021-04-12 18:23:04 +00:00
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, future
|
2021-04-12 18:23:04 +00:00
|
|
|
, tornado
|
|
|
|
, urllib3
|
2021-06-28 23:13:55 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-telegram-bot";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "13.14";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-6TkdQ+sRI94md6nSTqh4qdUyfWWyQZr7plP0dtJq7MM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
APScheduler
|
2021-06-28 23:13:55 +00:00
|
|
|
cachetools
|
2021-04-12 18:23:04 +00:00
|
|
|
certifi
|
|
|
|
decorator
|
|
|
|
future
|
|
|
|
tornado
|
|
|
|
urllib3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
# --with-upstream-urllib3 is not working properly
|
|
|
|
postPatch = ''
|
2021-03-09 03:18:52 +00:00
|
|
|
rm -r telegram/vendor
|
|
|
|
|
|
|
|
substituteInPlace requirements.txt \
|
2021-10-14 00:43:12 +00:00
|
|
|
--replace "APScheduler==3.6.3" "APScheduler" \
|
2022-09-30 11:47:45 +00:00
|
|
|
--replace "cachetools==4.2.2" "cachetools" \
|
|
|
|
--replace "tornado==6.1" "tornado"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-04-12 18:23:04 +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;
|
2021-10-14 00:43:12 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"telegram"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-04-12 18:23:04 +00:00
|
|
|
description = "Python library to interface with the Telegram Bot API";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://python-telegram-bot.org";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
|
|
|
};
|
|
|
|
}
|