1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 requests, 6 uritemplate, 7 python-dateutil, 8 pyjwt, 9 pytest-xdist, 10 pytestCheckHook, 11 betamax, 12 betamax-matchers, 13 hatchling, 14 fetchpatch, 15}: 16 17buildPythonPackage rec { 18 pname = "github3-py"; 19 version = "4.0.1"; 20 pyproject = true; 21 22 src = fetchPypi { 23 pname = "github3.py"; 24 inherit version; 25 hash = "sha256-MNVxB2dT78OJ7cf5qu8zik/LJLVNiWjV85sTQvRd3TY="; 26 }; 27 28 patches = [ 29 (fetchpatch { 30 # disable tests with "AttributeError: 'MockHTTPResponse' object has no attribute 'close'", due to betamax 31 url = "https://github.com/sigmavirus24/github3.py/commit/9d6124c09b0997b5e83579549bcf22b3e901d7e5.patch"; 32 hash = "sha256-8Z4vN7iKl/sOcEJptsH5jsqijZgvL6jS7kymZ8+m6bY="; 33 }) 34 ]; 35 36 build-system = [ hatchling ]; 37 38 dependencies = [ 39 pyjwt 40 python-dateutil 41 requests 42 uritemplate 43 ] ++ pyjwt.optional-dependencies.crypto; 44 45 pythonImportsCheck = [ "github3" ]; 46 47 nativeCheckInputs = [ 48 pytest-xdist 49 pytestCheckHook 50 betamax 51 betamax-matchers 52 ]; 53 54 meta = { 55 homepage = "https://github3py.readthedocs.org/en/master/"; 56 description = "Wrapper for the GitHub API written in python"; 57 changelog = "https://github.com/sigmavirus24/github3.py/blob/${version}/docs/source/release-notes/${version}.rst"; 58 license = lib.licenses.bsd3; 59 maintainers = with lib.maintainers; [ pSub ]; 60 }; 61}