1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 7 # propagates 8 django, 9 jwcrypto, 10 requests, 11 oauthlib, 12 13 # tests 14 djangorestframework, 15 pytest-cov-stub, 16 pytest-django, 17 pytest-mock, 18 pytestCheckHook, 19}: 20 21buildPythonPackage rec { 22 pname = "django-oauth-toolkit"; 23 version = "3.0.1"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "jazzband"; 28 repo = "django-oauth-toolkit"; 29 tag = version; 30 hash = "sha256-Ya0KlX+vtLXN2Fgk0Gv7KemJCUTwkaH+4GQA1ByUlBY="; 31 }; 32 33 build-system = [ setuptools ]; 34 35 dependencies = [ 36 django 37 jwcrypto 38 oauthlib 39 requests 40 ]; 41 42 preCheck = '' 43 export DJANGO_SETTINGS_MODULE=tests.settings 44 ''; 45 46 # xdist is disabled right now because it can cause race conditions on high core machines 47 # https://github.com/jazzband/django-oauth-toolkit/issues/1300 48 nativeCheckInputs = [ 49 djangorestframework 50 pytest-cov-stub 51 pytest-django 52 # pytest-xdist 53 pytest-mock 54 pytestCheckHook 55 ]; 56 57 disabledTests = [ 58 # Failed to get a valid response from authentication server. Status code: 404, Reason: Not Found. 59 "test_response_when_auth_server_response_return_404" 60 ]; 61 62 meta = { 63 description = "OAuth2 goodies for the Djangonauts"; 64 homepage = "https://github.com/jazzband/django-oauth-toolkit"; 65 changelog = "https://github.com/jazzband/django-oauth-toolkit/django-filer/blob/${version}/CHANGELOG.md"; 66 license = lib.licenses.bsd2; 67 maintainers = with lib.maintainers; [ mmai ]; 68 }; 69}