1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 mypy-extensions, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9 setuptools, 10 six, 11}: 12 13buildPythonPackage rec { 14 pname = "pyannotate"; 15 version = "1.2.0"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-BO1YBLqzgVPVmB/JLYPc9qIog0U3aFYfBX53flwFdZk="; 23 }; 24 25 build-system = [ setuptools ]; 26 27 dependencies = [ 28 six 29 mypy-extensions 30 ]; 31 32 nativeCheckInputs = [ pytestCheckHook ]; 33 34 pythonImportsCheck = [ 35 "pyannotate_runtime" 36 "pyannotate_tools" 37 ]; 38 39 disabledTestPaths = 40 [ 41 "pyannotate_runtime/tests/test_collect_types.py" 42 ] 43 ++ lib.optionals (pythonAtLeast "3.11") [ 44 # Tests are using lib2to3 45 "pyannotate_tools/fixes/tests/test_annotate*.py" 46 "pyannotate_tools/annotations/tests/dundermain_test.py" 47 ]; 48 49 meta = with lib; { 50 description = "Auto-generate PEP-484 annotations"; 51 homepage = "https://github.com/dropbox/pyannotate"; 52 license = licenses.mit; 53 maintainers = [ ]; 54 mainProgram = "pyannotate"; 55 }; 56}