From 4d18808ed816860f3d9f7ee5ea12b4b6af9d27b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 15:06:39 +0200 Subject: [PATCH] python311Packages.pyannotate: refactor - disable failing tests --- .../python-modules/pyannotate/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyannotate/default.nix b/pkgs/development/python-modules/pyannotate/default.nix index 6c81a3f081b8..d77b60248132 100644 --- a/pkgs/development/python-modules/pyannotate/default.nix +++ b/pkgs/development/python-modules/pyannotate/default.nix @@ -4,14 +4,16 @@ fetchPypi, mypy-extensions, pytestCheckHook, + pythonAtLeast, pythonOlder, + setuptools, six, }: buildPythonPackage rec { pname = "pyannotate"; version = "1.2.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -20,7 +22,9 @@ buildPythonPackage rec { hash = "sha256-BO1YBLqzgVPVmB/JLYPc9qIog0U3aFYfBX53flwFdZk="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ six mypy-extensions ]; @@ -32,11 +36,20 @@ buildPythonPackage rec { "pyannotate_tools" ]; + disabledTestPaths = + [ + "pyannotate_runtime/tests/test_collect_types.py" + ] + ++ lib.optionals (pythonAtLeast "3.11") [ + # Tests are using lib2to3 + "pyannotate_tools/fixes/tests/test_annotate*.py" + ]; + meta = with lib; { description = "Auto-generate PEP-484 annotations"; - mainProgram = "pyannotate"; homepage = "https://github.com/dropbox/pyannotate"; license = licenses.mit; maintainers = [ ]; + mainProgram = "pyannotate"; }; }