Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / django-oauth-toolkit / default.nix
blobce03a1330f5f588d2f08b4d4353d4ea579259206
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonRelaxDepsHook
6 # propagates
7 , django
8 , jwcrypto
9 , requests
10 , oauthlib
12 # tests
13 , djangorestframework
14 , pytest-django
15 , pytest-xdist
16 , pytest-mock
17 , pytestCheckHook
20 buildPythonPackage rec {
21   pname = "django-oauth-toolkit";
22   version = "2.3.0";
23   format = "setuptools";
25   src = fetchFromGitHub {
26     owner = "jazzband";
27     repo = pname;
28     rev = "refs/tags/${version}";
29     hash = "sha256-oGg5MD9p4PSUVkt5pGLwjAF4SHHf4Aqr+/3FsuFaybY=";
30   };
32   postPatch = ''
33     sed -i '/cov/d' tox.ini
34   '';
36   propagatedBuildInputs = [
37     django
38     jwcrypto
39     oauthlib
40     requests
41   ];
43   nativeBuildInputs = [ pythonRelaxDepsHook ];
44   pythonRelaxDeps = [
45     "django"
46   ];
48   DJANGO_SETTINGS_MODULE = "tests.settings";
50   # xdist is disabled right now because it can cause race conditions on high core machines
51   # https://github.com/jazzband/django-oauth-toolkit/issues/1300
52   nativeCheckInputs = [
53     djangorestframework
54     pytest-django
55     # pytest-xdist
56     pytest-mock
57     pytestCheckHook
58   ];
60   disabledTests = [
61     # Failed to get a valid response from authentication server. Status code: 404, Reason: Not Found.
62     "test_response_when_auth_server_response_return_404"
63   ];
65   meta = with lib; {
66     description = "OAuth2 goodies for the Djangonauts";
67     homepage = "https://github.com/jazzband/django-oauth-toolkit";
68     license = licenses.bsd2;
69     maintainers = with maintainers; [ mmai ];
70   };