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"; }; }