Files
nixpkgs/pkgs/development/python-modules/django-stubs/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

79 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
django-stubs-ext,
django,
fetchFromGitHub,
hatchling,
redis,
mypy,
pytest-mypy-plugins,
oracledb,
pytestCheckHook,
pythonOlder,
tomli,
types-pytz,
types-pyyaml,
types-redis,
typing-extensions,
}:
buildPythonPackage rec {
pname = "django-stubs";
version = "5.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "typeddjango";
repo = "django-stubs";
tag = version;
hash = "sha256-kF5g0/rkMQxYTfSrTqzZ6BuqGlE42K/AVhc1/ARc+/c=";
};
build-system = [ hatchling ];
dependencies = [
django
django-stubs-ext
types-pytz
types-pyyaml
typing-extensions
]
++ lib.optionals (pythonOlder "3.11") [ tomli ];
optional-dependencies = {
compatible-mypy = [ mypy ];
oracle = [ oracledb ];
redis = [
redis
types-redis
];
};
nativeCheckInputs = [
pytest-mypy-plugins
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
disabledTests = [
# AttributeError: module 'django.contrib.auth.forms' has no attribute 'SetUnusablePasswordMixin'
"test_find_classes_inheriting_from_generic"
];
disabledTestPaths = [
# Skip type checking
"tests/typecheck/"
];
pythonImportsCheck = [ "django-stubs" ];
meta = {
description = "PEP-484 stubs for Django";
homepage = "https://github.com/typeddjango/django-stubs";
changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = [ ];
};
}