1{ lib 2, blinker 3, buildPythonPackage 4, cryptography 5, fetchFromGitHub 6, mock 7, pyjwt 8, pytestCheckHook 9, pythonOlder 10 11# for passthru.tests 12, django-allauth 13, django-oauth-toolkit 14, google-auth-oauthlib 15, requests-oauthlib 16}: 17 18buildPythonPackage rec { 19 pname = "oauthlib"; 20 version = "3.2.2"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = pname; 27 repo = pname; 28 rev = "v${version}"; 29 hash = "sha256-KADS1pEaLYi86LEt2VVuz8FVTBANzxC8EeQLgGMxuBU="; 30 }; 31 32 propagatedBuildInputs = [ 33 blinker 34 cryptography 35 pyjwt 36 ]; 37 38 nativeCheckInputs = [ 39 mock 40 pytestCheckHook 41 ]; 42 43 pythonImportsCheck = [ 44 "oauthlib" 45 ]; 46 47 passthru.tests = { 48 inherit 49 django-allauth 50 django-oauth-toolkit 51 google-auth-oauthlib 52 requests-oauthlib; 53 }; 54 55 meta = with lib; { 56 description = "Generic, spec-compliant, thorough implementation of the OAuth request-signing logic"; 57 homepage = "https://github.com/idan/oauthlib"; 58 license = licenses.bsd3; 59 maintainers = with maintainers; [ prikhi ]; 60 }; 61}