1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 requests, 7 uritemplate, 8 python-dateutil, 9 pyjwt, 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 format = "pyproject"; 21 22 disabled = pythonOlder "3.6"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-MNVxB2dT78OJ7cf5qu8zik/LJLVNiWjV85sTQvRd3TY="; 27 }; 28 29 nativeBuildInputs = [ hatchling ]; 30 31 propagatedBuildInputs = [ 32 pyjwt 33 python-dateutil 34 requests 35 uritemplate 36 ] ++ pyjwt.optional-dependencies.crypto; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 betamax 41 betamax-matchers 42 ]; 43 44 patches = [ 45 (fetchpatch { 46 # disable tests with "AttributeError: 'MockHTTPResponse' object has no attribute 'close'", due to betamax 47 url = "https://github.com/sigmavirus24/github3.py/commit/9d6124c09b0997b5e83579549bcf22b3e901d7e5.patch"; 48 hash = "sha256-8Z4vN7iKl/sOcEJptsH5jsqijZgvL6jS7kymZ8+m6bY="; 49 }) 50 ]; 51 52 # Solves "__main__.py: error: unrecognized arguments: -nauto" 53 preCheck = '' 54 rm tox.ini 55 ''; 56 57 disabledTests = [ 58 # FileNotFoundError: [Errno 2] No such file or directory: 'tests/id_rsa.pub' 59 "test_delete_key" 60 ]; 61 62 meta = with lib; { 63 homepage = "https://github3py.readthedocs.org/en/master/"; 64 description = "A wrapper for the GitHub API written in python"; 65 license = licenses.bsd3; 66 maintainers = with maintainers; [ pSub ]; 67 }; 68}