biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / djangorestframework / default.nix
blob108ec71a29784227eb3f532f1bc44c0cf25ac8e6
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
7   # build-system
8   setuptools,
10   # dependencies
11   django,
12   pytz,
14   # optional-dependencies
15   coreapi,
16   coreschema,
17   django-guardian,
18   inflection,
19   psycopg2,
20   pygments,
21   pyyaml,
23   # tests
24   pytestCheckHook,
25   pytest-django,
28 buildPythonPackage rec {
29   pname = "djangorestframework";
30   version = "3.15.2";
31   pyproject = true;
32   disabled = pythonOlder "3.6";
34   src = fetchFromGitHub {
35     owner = "encode";
36     repo = "django-rest-framework";
37     rev = version;
38     hash = "sha256-ne0sk4m11Ha77tNmCsdhj7QVmCkYj5GjLn/dLF4qxU8=";
39   };
41   build-system = [ setuptools ];
43   dependencies = [
44     django
45     pygments
46   ] ++ (lib.optional (lib.versionOlder django.version "5.0.0") pytz);
48   optional-dependencies = {
49     complete = [
50       coreapi
51       coreschema
52       django-guardian
53       inflection
54       psycopg2
55       pygments
56       pyyaml
57     ];
58   };
60   nativeCheckInputs = [
61     pytest-django
62     pytestCheckHook
63   ] ++ optional-dependencies.complete;
65   disabledTests = [
66     # https://github.com/encode/django-rest-framework/issues/9422
67     "test_urlpatterns"
68   ];
70   pythonImportsCheck = [ "rest_framework" ];
72   meta = with lib; {
73     changelog = "https://github.com/encode/django-rest-framework/releases/tag/3.15.1";
74     description = "Web APIs for Django, made easy";
75     homepage = "https://www.django-rest-framework.org/";
76     maintainers = with maintainers; [ desiderius ];
77     license = licenses.bsd2;
78   };