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