python311Packages.githubkit: add optional-dependencies

This commit is contained in:
Fabian Affolter 2024-01-22 09:40:45 +01:00
parent 9969fb7ff4
commit 95386d1c13

View file

@ -1,9 +1,12 @@
{ lib
, anyio
, buildPythonPackage
, fetchPypi
, poetry-core
, httpx
, poetry-core
, pydantic
, pyjwt
, pythonOlder
, typing-extensions
}:
@ -12,6 +15,8 @@ buildPythonPackage rec {
version = "0.10.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-sKikL+761mBP7j+qugHKDQ0hVXT51FV8FYbB3ZJtweA=";
@ -27,11 +32,34 @@ buildPythonPackage rec {
typing-extensions
];
pythonImportsCheck = [ "githubkit" ];
passthru.optional-dependencies = {
all = [
anyio
pyjwt
];
jwt = [
pyjwt
];
auth-app = [
pyjwt
];
auth-oauth-device = [
anyio
];
auth = [
anyio
pyjwt
];
};
pythonImportsCheck = [
"githubkit"
];
meta = {
description = "GitHub SDK for Python";
homepage = "https://github.com/yanyongyu/githubkit";
changelog = "https://github.com/yanyongyu/githubkit/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kranzes ];
};