1{ lib
2, buildPythonPackage
3, cryptography
4, django
5, djangorestframework
6, fetchPypi
7, pyjwt
8, python-jose
9, pythonOlder
10, setuptools-scm
11}:
12
13buildPythonPackage rec {
14 pname = "djangorestframework-simplejwt";
15 version = "5.3.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 pname = "djangorestframework_simplejwt";
22 inherit version;
23 hash = "sha256-jkxd/KjRHAuKZt/YpOP8HGqn6hiNEJB/+RyUL0tS7WY=";
24 };
25
26 nativeBuildInputs = [
27 setuptools-scm
28 ];
29
30 propagatedBuildInputs = [
31 django
32 djangorestframework
33 pyjwt
34 ];
35
36 passthru.optional-dependencies = {
37 python-jose = [
38 python-jose
39 ];
40 crypto = [
41 cryptography
42 ];
43 };
44
45 # Test raises django.core.exceptions.ImproperlyConfigured
46 doCheck = false;
47
48 pythonImportsCheck = [
49 "rest_framework_simplejwt"
50 ];
51
52 meta = with lib; {
53 description = "JSON Web Token authentication plugin for Django REST Framework";
54 homepage = "https://github.com/davesque/django-rest-framework-simplejwt";
55 changelog = "https://github.com/jazzband/djangorestframework-simplejwt/blob/v${version}/CHANGELOG.md";
56 license = licenses.mit;
57 maintainers = with maintainers; [ arnoldfarkas ];
58 };
59}