summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-stubs/default.nix
diff options
context:
space:
mode:
authornixpkgs-ci[bot] <190413589+nixpkgs-ci[bot]@users.noreply.github.com>2025-08-11 00:24:16 +0000
committerGitHub <noreply@github.com>2025-08-11 00:24:16 +0000
commitef3238a84cc5d5b60de2aec6ecc7d434c8da1b5c (patch)
tree5605011b7d6dad28bac39254aa1488cadddac7c3 /pkgs/development/python-modules/django-stubs/default.nix
parenthaskellPackages.cabal2nix-unstable: 2025-06-14 -> 2025-08-10 (diff)
parentbalena-cli: 22.1.5 -> 22.2.4 (#432566) (diff)
downloadnixpkgs-origin/haskell-updates.tar.gz
Merge b1b0d690fbb0e4a2fa029ab625a3b1646487fee1 into haskell-updatesorigin/haskell-updates
Diffstat (limited to 'pkgs/development/python-modules/django-stubs/default.nix')
-rw-r--r--pkgs/development/python-modules/django-stubs/default.nix46
1 files changed, 31 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/django-stubs/default.nix b/pkgs/development/python-modules/django-stubs/default.nix
index bc7897dd6ba9..1bc25588fcd8 100644
--- a/pkgs/development/python-modules/django-stubs/default.nix
+++ b/pkgs/development/python-modules/django-stubs/default.nix
@@ -1,38 +1,38 @@
{
lib,
buildPythonPackage,
- django,
django-stubs-ext,
- fetchPypi,
+ django,
+ fetchFromGitHub,
+ hatchling,
mypy,
+ oracledb,
pytestCheckHook,
+ pytest-mypy-plugins,
pythonOlder,
- setuptools,
+ redis,
tomli,
types-pytz,
types-pyyaml,
+ types-redis,
typing-extensions,
}:
buildPythonPackage rec {
pname = "django-stubs";
- version = "5.2.0";
+ version = "5.2.2";
pyproject = true;
- disabled = pythonOlder "3.8";
+ disabled = pythonOlder "3.10";
- src = fetchPypi {
- pname = "django_stubs";
- inherit version;
- hash = "sha256-B+JcLTy/9b5UAif/N3GcyJ8hXfqqpesDinWwG7+7JyI=";
+ src = fetchFromGitHub {
+ owner = "typeddjango";
+ repo = "django-stubs";
+ tag = version;
+ hash = "sha256-kF5g0/rkMQxYTfSrTqzZ6BuqGlE42K/AVhc1/ARc+/c=";
};
- postPatch = ''
- substituteInPlace pyproject.toml \
- --replace-fail "setuptools<79.0.0" setuptools
- '';
-
- build-system = [ setuptools ];
+ build-system = [ hatchling ];
dependencies = [
django
@@ -45,15 +45,31 @@ buildPythonPackage rec {
optional-dependencies = {
compatible-mypy = [ mypy ];
+ oracle = [ oracledb ];
+ redis = [
+ redis
+ types-redis
+ ];
};
nativeCheckInputs = [
+ pytest-mypy-plugins
pytestCheckHook
]
++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "django-stubs" ];
+ disabledTests = [
+ # AttributeError: module 'django.contrib.auth.forms' has no attribute
+ "test_find_classes_inheriting_from_generic"
+ ];
+
+ disabledTestPaths = [
+ # Skip type checking
+ "tests/typecheck/"
+ ];
+
meta = with lib; {
description = "PEP-484 stubs for Django";
homepage = "https://github.com/typeddjango/django-stubs";