python3Packages.telethon: 1.42.0 -> 1.44.0 (#541682)

This commit is contained in:
Nikolay Korotkiy
2026-07-18 08:36:51 +00:00
committed by GitHub

View File

@@ -2,37 +2,34 @@
lib,
buildPythonPackage,
fetchFromCodeberg,
pythonAtLeast,
openssl,
rsa,
pyaes,
cryptg,
setuptools,
hatchling,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "telethon";
version = "1.42.0";
version = "1.44.0";
pyproject = true;
src = fetchFromCodeberg {
owner = "Lonami";
repo = "Telethon";
tag = "v${finalAttrs.version}";
hash = "sha256-NMHJkSTGR3/tck0k97EfVN9f85PAWst+EZ6G7Tgrt5s=";
hash = "sha256-NzLlDwxzLWyySluUazQGPDukT71awCrJZEbjd5T9K/g=";
};
disabled = pythonAtLeast "3.14";
postPatch = ''
substituteInPlace telethon/crypto/libssl.py --replace-fail \
"ctypes.util.find_library('ssl')" "'${lib.getLib openssl}/lib/libssl.so'"
'';
build-system = [
setuptools
hatchling
];
dependencies = [
@@ -50,6 +47,15 @@ buildPythonPackage (finalAttrs: {
]
++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
# TL objects (telethon/tl/functions.py etc.) are generated by the hatch build
# hook and only exist in the wheel; remove the source tree so tests import
# the installed package instead of the incomplete sources.
preCheck = ''
rm -r telethon
'';
pythonImportsCheck = [ "telethon" ];
meta = {
homepage = "https://codeberg.org/Lonami/Telethon";
description = "Full-featured Telegram client library for Python 3";