mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
python3Packages.telethon: 1.42.0 -> 1.44.0 (#541682)
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user