From 53be62886a25e78ea04a8b3150678b8d4866aa00 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sun, 14 Jun 2026 23:53:44 +0200 Subject: [PATCH] python3Packages.githubkit: 0.14.4 -> 0.16.0 Changelog: https://github.com/yanyongyu/githubkit/releases/tag/v0.16.0 --- .../python-modules/githubkit/default.nix | 97 ++++++++++++++----- 1 file changed, 73 insertions(+), 24 deletions(-) diff --git a/pkgs/development/python-modules/githubkit/default.nix b/pkgs/development/python-modules/githubkit/default.nix index e8b3e5f7fe7e..6b3b665a1b33 100644 --- a/pkgs/development/python-modules/githubkit/default.nix +++ b/pkgs/development/python-modules/githubkit/default.nix @@ -8,55 +8,105 @@ pydantic, pyjwt, pytest-cov-stub, - pytest-xdist, pytestCheckHook, typing-extensions, uv-build, }: -buildPythonPackage rec { +let + + mkGithubkitSchema = + { + pname, + version, + src, + }: + buildPythonPackage { + inherit pname version src; + sourceRoot = "${src.name}/packages/${pname}"; + pyproject = true; + + # circular dependencies + pythonRemoveDeps = [ + "githubkit" + "githubkit-schemas" + ]; + + build-system = [ uv-build ]; + }; + +in + +buildPythonPackage (finalAttrs: { pname = "githubkit"; - version = "0.14.4"; + version = "0.16.0"; pyproject = true; src = fetchFromGitHub { owner = "yanyongyu"; repo = "githubkit"; - tag = "v${version}"; - hash = "sha256-ia4ixtui7F8NauytXYi2aaiKXejIOHNijQrSm2RtzdU="; + tag = "v${finalAttrs.version}"; + hash = "sha256-zVUJWwmRx/2phkDWwWyazhPdwthsMMcE0S7E4R1TebQ="; }; - pythonRelaxDeps = [ "hishel" ]; + passthru.schemas = { + githubkit-schemas = mkGithubkitSchema { + pname = "githubkit-schemas"; + version = "26.6.14"; + inherit (finalAttrs) src; + }; + + githubkit-schemas-2022-11-28 = mkGithubkitSchema { + pname = "githubkit-schemas-2022-11-28"; + version = "26.6.14"; + inherit (finalAttrs) src; + }; + + githubkit-schemas-2026-03-10 = mkGithubkitSchema { + pname = "githubkit-schemas-2026-03-10"; + version = "26.6.14"; + inherit (finalAttrs) src; + }; + + githubkit-schemas-ghec-2022-11-28 = mkGithubkitSchema { + pname = "githubkit-schemas-ghec-2022-11-28"; + version = "26.6.14"; + inherit (finalAttrs) src; + }; + + githubkit-schemas-ghec-2026-03-10 = mkGithubkitSchema { + pname = "githubkit-schemas-ghec-2026-03-10"; + version = "26.6.14"; + inherit (finalAttrs) src; + }; + }; build-system = [ uv-build ]; dependencies = [ - hishel + anyio httpx - pydantic + hishel typing-extensions - ]; + pydantic + ] + ++ hishel.optional-dependencies.async + ++ hishel.optional-dependencies.httpx + # for simplicity we just propagate all schemas, rather than litter pkgs/development/python-modules + ++ lib.attrValues finalAttrs.passthru.schemas; optional-dependencies = { - all = [ - anyio - pyjwt - ]; + all = [ pyjwt ]; jwt = [ pyjwt ]; auth-app = [ pyjwt ]; - auth-oauth-device = [ anyio ]; - auth = [ - anyio - pyjwt - ]; + auth-oauth-device = [ ]; + auth = [ pyjwt ]; }; nativeCheckInputs = [ pytestCheckHook pytest-cov-stub - pytest-xdist - ] - ++ lib.concatAttrValues optional-dependencies; + ]; pythonImportsCheck = [ "githubkit" ]; @@ -71,11 +121,10 @@ buildPythonPackage rec { ]; meta = { - broken = true; description = "GitHub SDK for Python"; homepage = "https://github.com/yanyongyu/githubkit"; - changelog = "https://github.com/yanyongyu/githubkit/releases/tag/${src.tag}"; + changelog = "https://github.com/yanyongyu/githubkit/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = [ ]; }; -} +})