depot/third_party/nixpkgs/pkgs/development/python-modules/django-stubs/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

63 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, django
, django-stubs-ext
, fetchPypi
, mypy
, pytestCheckHook
, pythonOlder
, setuptools
, tomli
, types-pytz
, types-pyyaml
, typing-extensions
}:
buildPythonPackage rec {
pname = "django-stubs";
version = "4.2.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-jM0v9O5a3yK547expRbS4cIZHp2U5nLDXMK8PdYeD2s=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
django
django-stubs-ext
types-pytz
types-pyyaml
typing-extensions
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
passthru.optional-dependencies = {
compatible-mypy = [
mypy
];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"django-stubs"
];
meta = with lib; {
description = "PEP-484 stubs for Django";
homepage = "https://github.com/typeddjango/django-stubs";
changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ elohmeier ];
};
}