at master 1.1 kB view raw
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 "pyannotate_runtime/tests/test_collect_types.py" 41 ] 42 ++ lib.optionals (pythonAtLeast "3.11") [ 43 # Tests are using lib2to3 44 "pyannotate_tools/fixes/tests/test_annotate*.py" 45 "pyannotate_tools/annotations/tests/dundermain_test.py" 46 ]; 47 48 meta = with lib; { 49 description = "Auto-generate PEP-484 annotations"; 50 homepage = "https://github.com/dropbox/pyannotate"; 51 license = licenses.mit; 52 maintainers = [ ]; 53 mainProgram = "pyannotate"; 54 }; 55}