evcc: 0.131.8 -> 0.131.10 (#364658)
[NixPkgs.git] / pkgs / development / python-modules / dj-rest-auth / default.nix
blob9dddc459a3cc3017cdd3c87155fb440226c7c4a2
2   lib,
3   buildPythonPackage,
4   django,
5   django-allauth,
6   djangorestframework,
7   djangorestframework-simplejwt,
8   fetchFromGitHub,
9   python,
10   pythonOlder,
11   responses,
12   setuptools,
13   unittest-xml-reporting,
16 buildPythonPackage rec {
17   pname = "dj-rest-auth";
18   version = "6.0.0";
19   pyproject = true;
21   disabled = pythonOlder "3.8";
23   src = fetchFromGitHub {
24     owner = "iMerica";
25     repo = "dj-rest-auth";
26     rev = "refs/tags/${version}";
27     hash = "sha256-fNy1uN3oH54Wd9+EqYpiV0ot1MbSSC7TZoAARQeR81s=";
28   };
30   postPatch = ''
31     substituteInPlace setup.py \
32       --replace-fail "==" ">="
33     substituteInPlace dj_rest_auth/tests/test_api.py \
34       --replace-fail "assertEquals" "assertEqual"
35   '';
37   build-system = [ setuptools ];
39   buildInputs = [ django ];
41   dependencies = [ djangorestframework ];
43   optional-dependencies.with_social = [ django-allauth ];
45   nativeCheckInputs = [
46     djangorestframework-simplejwt
47     responses
48     unittest-xml-reporting
49   ] ++ optional-dependencies.with_social;
51   preCheck = ''
52     # Test connects to graph.facebook.com
53     substituteInPlace dj_rest_auth/tests/test_serializers.py \
54       --replace-fail "def test_http_error" "def dont_test_http_error"
55   '';
57   checkPhase = ''
58     runHook preCheck
59     ${python.interpreter} runtests.py
60     runHook postCheck
61   '';
63   pythonImportsCheck = [ "dj_rest_auth" ];
65   meta = with lib; {
66     description = "Authentication for Django Rest Framework";
67     homepage = "https://github.com/iMerica/dj-rest-auth";
68     changelog = "https://github.com/iMerica/dj-rest-auth/releases/tag/${version}";
69     license = licenses.mit;
70     maintainers = [ ];
71   };