Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 73 lines 1.5 kB view raw
1{ 2 lib, 3 blinker, 4 buildPythonPackage, 5 cryptography, 6 fetchFromGitHub, 7 mock, 8 pyjwt, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12 13 # for passthru.tests 14 django-allauth, 15 django-oauth-toolkit, 16 google-auth-oauthlib, 17 requests-oauthlib, 18}: 19 20buildPythonPackage rec { 21 pname = "oauthlib"; 22 version = "3.2.2"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "oauthlib"; 29 repo = "oauthlib"; 30 rev = "v${version}"; 31 hash = "sha256-KADS1pEaLYi86LEt2VVuz8FVTBANzxC8EeQLgGMxuBU="; 32 }; 33 34 nativeBuildInputs = [ setuptools ]; 35 36 optional-dependencies = { 37 rsa = [ cryptography ]; 38 signedtoken = [ 39 cryptography 40 pyjwt 41 ]; 42 signals = [ blinker ]; 43 }; 44 45 nativeCheckInputs = [ 46 mock 47 pytestCheckHook 48 ] ++ lib.flatten (lib.attrValues optional-dependencies); 49 50 disabledTests = [ 51 # https://github.com/oauthlib/oauthlib/issues/877 52 "test_rsa_bad_keys" 53 ]; 54 55 pythonImportsCheck = [ "oauthlib" ]; 56 57 passthru.tests = { 58 inherit 59 django-allauth 60 django-oauth-toolkit 61 google-auth-oauthlib 62 requests-oauthlib 63 ; 64 }; 65 66 meta = with lib; { 67 changelog = "https://github.com/oauthlib/oauthlib/blob/${src.rev}/CHANGELOG.rst"; 68 description = "Generic, spec-compliant, thorough implementation of the OAuth request-signing logic"; 69 homepage = "https://github.com/oauthlib/oauthlib"; 70 license = licenses.bsd3; 71 maintainers = with maintainers; [ prikhi ]; 72 }; 73}