504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
134 lines
2.3 KiB
Nix
134 lines
2.3 KiB
Nix
{ lib
|
|
, aiolimiter
|
|
, apscheduler
|
|
, beautifulsoup4
|
|
, buildPythonPackage
|
|
, cachetools
|
|
, cryptography
|
|
, fetchFromGitHub
|
|
, flaky
|
|
, httpx
|
|
, pytest-asyncio
|
|
, pytest-timeout
|
|
, pytest-xdist
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pytz
|
|
, setuptools
|
|
, wheel
|
|
, tornado
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-telegram-bot";
|
|
version = "20.7";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-lUErrBF4iucgWRRT535pwaayYY+gLgsT6Zmc+FM8aE0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
wheel
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiolimiter
|
|
apscheduler
|
|
cachetools
|
|
cryptography
|
|
httpx
|
|
pytz
|
|
]
|
|
++ httpx.optional-dependencies.socks
|
|
++ httpx.optional-dependencies.http2;
|
|
|
|
nativeCheckInputs = [
|
|
beautifulsoup4
|
|
flaky
|
|
pytest-asyncio
|
|
pytest-timeout
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
tornado
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"telegram"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests require network access
|
|
"TestAIO"
|
|
"TestAnimation"
|
|
"TestApplication"
|
|
"TestAudio"
|
|
"TestBase"
|
|
"TestBot"
|
|
"TestCallback"
|
|
"TestChat"
|
|
"TestChosenInlineResult"
|
|
"TestCommandHandler"
|
|
"TestConstants"
|
|
"TestContact"
|
|
"TestConversationHandler"
|
|
"TestDice"
|
|
"TestDict"
|
|
"TestDocument"
|
|
"TestFile"
|
|
"TestForceReply"
|
|
"TestForum"
|
|
"TestGame"
|
|
"TestGet"
|
|
"TestHTTP"
|
|
"TestInline"
|
|
"TestInput"
|
|
"TestInvoice"
|
|
"TestJob"
|
|
"TestKeyboard"
|
|
"TestLocation"
|
|
"TestMask"
|
|
"TestMenu"
|
|
"TestMessage"
|
|
"TestMeta"
|
|
"TestOrder"
|
|
"TestPassport"
|
|
"TestPhoto"
|
|
"TestPickle"
|
|
"TestPoll"
|
|
"TestPre"
|
|
"TestPrefix"
|
|
"TestProximity"
|
|
"TestReply"
|
|
"TestRequest"
|
|
"TestSend"
|
|
"TestSent"
|
|
"TestShipping"
|
|
"TestSlot"
|
|
"TestSticker"
|
|
"TestString"
|
|
"TestSuccess"
|
|
"TestTelegram"
|
|
"TestType"
|
|
"TestUpdate"
|
|
"TestUser"
|
|
"TestVenue"
|
|
"TestVideo"
|
|
"TestVoice"
|
|
"TestWeb"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library to interface with the Telegram Bot API";
|
|
homepage = "https://python-telegram-bot.org";
|
|
changelog = "https://github.com/python-telegram-bot/python-telegram-bot/blob/v${version}/CHANGES.rst";
|
|
license = licenses.lgpl3Only;
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
|
};
|
|
}
|