nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 78 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 django-stubs-ext, 5 django, 6 fetchFromGitHub, 7 uv-build, 8 redis, 9 mypy, 10 pytest-mypy-plugins, 11 oracledb, 12 pytestCheckHook, 13 pythonOlder, 14 tomli, 15 types-pytz, 16 types-pyyaml, 17 types-redis, 18 typing-extensions, 19}: 20 21buildPythonPackage rec { 22 pname = "django-stubs"; 23 version = "5.2.9"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "typeddjango"; 28 repo = "django-stubs"; 29 tag = version; 30 hash = "sha256-42FluS2fmfgj4qk2u+Z/7TGhXY4WKUc0cI00go6rnGc="; 31 }; 32 33 build-system = [ uv-build ]; 34 35 dependencies = [ 36 django 37 django-stubs-ext 38 types-pytz 39 types-pyyaml 40 typing-extensions 41 ] 42 ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 43 44 optional-dependencies = { 45 compatible-mypy = [ mypy ]; 46 oracle = [ oracledb ]; 47 redis = [ 48 redis 49 types-redis 50 ]; 51 }; 52 53 nativeCheckInputs = [ 54 pytest-mypy-plugins 55 pytestCheckHook 56 ] 57 ++ lib.concatAttrValues optional-dependencies; 58 59 disabledTests = [ 60 # AttributeError: module 'django.contrib.auth.forms' has no attribute 'SetUnusablePasswordMixin' 61 "test_find_classes_inheriting_from_generic" 62 ]; 63 64 disabledTestPaths = [ 65 # Skip type checking 66 "tests/typecheck/" 67 ]; 68 69 pythonImportsCheck = [ "django-stubs" ]; 70 71 meta = { 72 description = "PEP-484 stubs for Django"; 73 homepage = "https://github.com/typeddjango/django-stubs"; 74 changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${src.tag}"; 75 license = lib.licenses.mit; 76 maintainers = [ ]; 77 }; 78}