Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 56 lines 1.2 kB view raw
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 = "4.2.7"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-jM0v9O5a3yK547expRbS4cIZHp2U5nLDXMK8PdYeD2s="; 27 }; 28 29 nativeBuildInputs = [ setuptools ]; 30 31 propagatedBuildInputs = [ 32 django 33 django-stubs-ext 34 types-pytz 35 types-pyyaml 36 typing-extensions 37 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 38 39 passthru.optional-dependencies = { 40 compatible-mypy = [ mypy ]; 41 }; 42 43 nativeCheckInputs = [ 44 pytestCheckHook 45 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 46 47 pythonImportsCheck = [ "django-stubs" ]; 48 49 meta = with lib; { 50 description = "PEP-484 stubs for Django"; 51 homepage = "https://github.com/typeddjango/django-stubs"; 52 changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ elohmeier ]; 55 }; 56}