summary refs log tree commit diff
path: root/pkgs/development/python-modules/typeguard/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/typeguard/default.nix')
-rw-r--r--pkgs/development/python-modules/typeguard/default.nix34
1 files changed, 24 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/typeguard/default.nix b/pkgs/development/python-modules/typeguard/default.nix
index c2a6171e1b8..23e3bdc5b54 100644
--- a/pkgs/development/python-modules/typeguard/default.nix
+++ b/pkgs/development/python-modules/typeguard/default.nix
@@ -2,6 +2,7 @@
 , fetchPypi
 , pythonOlder
 , lib
+, setuptools
 , setuptools-scm
 , pytestCheckHook
 , typing-extensions
@@ -13,30 +14,39 @@
 
 buildPythonPackage rec {
   pname = "typeguard";
-  version = "2.13.3";
+  version = "4.1.5";
+  format = "pyproject";
+
   disabled = pythonOlder "3.5";
-  outputs = [ "out" "doc" ];
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4";
+    hash = "sha256-6goRO7wRG8/8kHieuyFWJcljQR9wlqfpBi1ORjDBVf0=";
   };
 
+  outputs = [
+    "out"
+    "doc"
+  ];
+
   nativeBuildInputs = [
     glibcLocales
+    setuptools
     setuptools-scm
     sphinxHook
     sphinx-autodoc-typehints
     sphinx-rtd-theme
   ];
 
-  LC_ALL = "en_US.utf-8";
+  propagatedBuildInputs = [
+    typing-extensions
+  ];
 
-  postPatch = ''
-    substituteInPlace setup.cfg --replace " --cov" ""
-  '';
+  env.LC_ALL = "en_US.utf-8";
 
-  nativeCheckInputs = [ pytestCheckHook typing-extensions ];
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
 
   disabledTestPaths = [
     # mypy tests aren't passing with latest mypy
@@ -44,8 +54,12 @@ buildPythonPackage rec {
   ];
 
   disabledTests = [
-    # not compatible with python3.10
-    "test_typed_dict"
+    # AssertionError: 'type of argument "x" must be ' != 'None'
+    "TestPrecondition::test_precondition_ok_and_typeguard_fails"
+    # AttributeError: 'C' object has no attribute 'x'
+    "TestInvariant::test_invariant_ok_and_typeguard_fails"
+    # AttributeError: 'D' object has no attribute 'x'
+    "TestInheritance::test_invariant_ok_and_typeguard_fails"
   ];
 
   meta = with lib; {