diff options
Diffstat (limited to 'pkgs/development/python-modules/dj-rest-auth/default.nix')
-rw-r--r-- | pkgs/development/python-modules/dj-rest-auth/default.nix | 67 |
1 files changed, 25 insertions, 42 deletions
diff --git a/pkgs/development/python-modules/dj-rest-auth/default.nix b/pkgs/development/python-modules/dj-rest-auth/default.nix index e415977d86374..49e0c49e75bb1 100644 --- a/pkgs/development/python-modules/dj-rest-auth/default.nix +++ b/pkgs/development/python-modules/dj-rest-auth/default.nix @@ -1,61 +1,46 @@ -{ lib -, buildPythonPackage -, django -, django-allauth -, djangorestframework -, djangorestframework-simplejwt -, fetchFromGitHub -, fetchpatch -, python -, pythonOlder -, responses -, setuptools -, unittest-xml-reporting +{ + lib, + buildPythonPackage, + django, + django-allauth, + djangorestframework, + djangorestframework-simplejwt, + fetchFromGitHub, + python, + pythonOlder, + responses, + setuptools, + unittest-xml-reporting, }: buildPythonPackage rec { pname = "dj-rest-auth"; - version = "5.0.2"; + version = "6.0.0"; pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "iMerica"; repo = "dj-rest-auth"; rev = "refs/tags/${version}"; - hash = "sha256-TqeNpxXn+v89fEiJ4AVNhp8blCfYQKFQfYmZ6/QlRbQ="; + hash = "sha256-fNy1uN3oH54Wd9+EqYpiV0ot1MbSSC7TZoAARQeR81s="; }; - patches = [ - # https://github.com/iMerica/dj-rest-auth/pull/597 - (fetchpatch { - name = "disable-email-confirmation-ratelimit-in-tests-to-support-new-allauth.patch"; - url = "https://github.com/iMerica/dj-rest-auth/commit/c8f19e18a93f4959da875f9c5cdd32f7d9363bba.patch"; - hash = "sha256-Y/YBjV+c5Gw1wMR5r/4VnyV/ewUVG0z4pjY/MB4ca9Y="; - }) - ]; - postPatch = '' substituteInPlace setup.py \ - --replace "==" ">=" + --replace-fail "==" ">=" + substituteInPlace dj_rest_auth/tests/test_api.py \ + --replace-fail "assertEquals" "assertEqual" ''; - nativeBuildInputs = [ - setuptools - ]; + build-system = [ setuptools ]; - buildInputs = [ - django - ]; + buildInputs = [ django ]; - propagatedBuildInputs = [ - djangorestframework - ]; + dependencies = [ djangorestframework ]; - passthru.optional-dependencies.with_social = [ - django-allauth - ]; + passthru.optional-dependencies.with_social = [ django-allauth ]; nativeCheckInputs = [ djangorestframework-simplejwt @@ -66,7 +51,7 @@ buildPythonPackage rec { preCheck = '' # Test connects to graph.facebook.com substituteInPlace dj_rest_auth/tests/test_serializers.py \ - --replace "def test_http_error" "def dont_test_http_error" + --replace-fail "def test_http_error" "def dont_test_http_error" ''; checkPhase = '' @@ -75,9 +60,7 @@ buildPythonPackage rec { runHook postCheck ''; - pythonImportsCheck = [ - "dj_rest_auth" - ]; + pythonImportsCheck = [ "dj_rest_auth" ]; meta = with lib; { description = "Authentication for Django Rest Framework"; |