1{ 2 lib, 3 buildPythonPackage, 4 django, 5 django-stubs-ext, 6 fetchPypi, 7 mypy, 8 pytestCheckHook, 9 pythonOlder, 10 setuptools, 11 tomli, 12 types-pytz, 13 types-pyyaml, 14 typing-extensions, 15}: 16 17buildPythonPackage rec { 18 pname = "django-stubs"; 19 version = "5.1.3"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchPypi { 25 pname = "django_stubs"; 26 inherit version; 27 hash = "sha256-jCMLxb6+5tooK6iietFQPISgxM0vRuY9FJ520qY+Y5o="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 django 34 django-stubs-ext 35 types-pytz 36 types-pyyaml 37 typing-extensions 38 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 39 40 optional-dependencies = { 41 compatible-mypy = [ mypy ]; 42 }; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 47 48 pythonImportsCheck = [ "django-stubs" ]; 49 50 meta = with lib; { 51 description = "PEP-484 stubs for Django"; 52 homepage = "https://github.com/typeddjango/django-stubs"; 53 changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ elohmeier ]; 56 }; 57}