python310Packages.pytelegrambotapi: switch to pytestCheckHook
- add optional-dependencies - normalize pname - add changelog to meta
This commit is contained in:
parent
68403fe04f
commit
6357cce27d
1 changed files with 60 additions and 10 deletions
|
@ -1,37 +1,87 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, aiohttp
|
||||
, requests
|
||||
, aioredis
|
||||
, buildPythonPackage
|
||||
, coloredlogs
|
||||
, fastapi
|
||||
, fetchFromGitHub
|
||||
, pillow
|
||||
, psutil
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, redis
|
||||
, requests
|
||||
, ujson
|
||||
, uvicorn
|
||||
, watchdog
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyTelegramBotAPI";
|
||||
pname = "pytelegrambotapi";
|
||||
version = "4.8.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-6nfpXzq2yCVDK8pAuWzAVzr0pKn5VHqb3UH9VXhSHJ0=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "eternnoir";
|
||||
repo = "pyTelegramBotAPI";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-BzCFhN/4EtmoOTdQ8faa4hV5sJIuGueeKeb//z2Roig=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
requests
|
||||
fastapi
|
||||
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
json = [
|
||||
ujson
|
||||
];
|
||||
PIL = [
|
||||
pillow
|
||||
];
|
||||
redis = [
|
||||
redis
|
||||
];
|
||||
aioredis = [
|
||||
aioredis
|
||||
];
|
||||
aiohttp = [
|
||||
aiohttp
|
||||
];
|
||||
fastapi = [
|
||||
fastapi
|
||||
];
|
||||
uvicorn = [
|
||||
uvicorn
|
||||
];
|
||||
psutil = [
|
||||
psutil
|
||||
];
|
||||
coloredlogs = [
|
||||
coloredlogs
|
||||
];
|
||||
watchdog = [
|
||||
watchdog
|
||||
];
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
requests
|
||||
] ++ passthru.optional-dependencies.watchdog
|
||||
++ passthru.optional-dependencies.aiohttp;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"telebot"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python implementation for the Telegram Bot API";
|
||||
homepage = "https://github.com/eternnoir/pyTelegramBotAPI";
|
||||
description = "A simple, but extensible Python implementation for the Telegram Bot API";
|
||||
changelog = "https://github.com/eternnoir/pyTelegramBotAPI/releases/tag/${version}";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ das_j ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue