at master 1.5 kB view raw
1{ 2 lib, 3 anyio, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hishel, 7 httpx, 8 pydantic, 9 pyjwt, 10 pytest-cov-stub, 11 pytest-xdist, 12 pytestCheckHook, 13 typing-extensions, 14 uv-build, 15}: 16 17buildPythonPackage rec { 18 pname = "githubkit"; 19 version = "0.13.3"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "yanyongyu"; 24 repo = "githubkit"; 25 tag = "v${version}"; 26 hash = "sha256-4THc5BNQGSrpf3Y3OoFisywEdKp8ZgNjle4yvVLUy1A="; 27 }; 28 29 pythonRelaxDeps = [ "hishel" ]; 30 31 build-system = [ uv-build ]; 32 33 dependencies = [ 34 hishel 35 httpx 36 pydantic 37 typing-extensions 38 ]; 39 40 optional-dependencies = { 41 all = [ 42 anyio 43 pyjwt 44 ]; 45 jwt = [ pyjwt ]; 46 auth-app = [ pyjwt ]; 47 auth-oauth-device = [ anyio ]; 48 auth = [ 49 anyio 50 pyjwt 51 ]; 52 }; 53 54 nativeCheckInputs = [ 55 pytestCheckHook 56 pytest-cov-stub 57 pytest-xdist 58 ] 59 ++ lib.flatten (builtins.attrValues optional-dependencies); 60 61 pythonImportsCheck = [ "githubkit" ]; 62 63 disabledTests = [ 64 # Tests require network access 65 "test_graphql" 66 "test_async_graphql" 67 "test_call" 68 "test_async_call" 69 "test_versioned_call" 70 "test_versioned_async_call" 71 ]; 72 73 meta = { 74 description = "GitHub SDK for Python"; 75 homepage = "https://github.com/yanyongyu/githubkit"; 76 changelog = "https://github.com/yanyongyu/githubkit/releases/tag/${src.tag}"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ kranzes ]; 79 }; 80}