Skip to content

Commit 4ada357

Browse files
authored
python311Packages.pyannotate: refactor (#348064)
2 parents 963540a + 4d18808 commit 4ada357

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

pkgs/development/python-modules/pyannotate/default.nix

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
fetchPypi,
55
mypy-extensions,
66
pytestCheckHook,
7+
pythonAtLeast,
78
pythonOlder,
9+
setuptools,
810
six,
911
}:
1012

1113
buildPythonPackage rec {
1214
pname = "pyannotate";
1315
version = "1.2.0";
14-
format = "setuptools";
16+
pyproject = true;
1517

1618
disabled = pythonOlder "3.7";
1719

@@ -20,7 +22,9 @@ buildPythonPackage rec {
2022
hash = "sha256-BO1YBLqzgVPVmB/JLYPc9qIog0U3aFYfBX53flwFdZk=";
2123
};
2224

23-
propagatedBuildInputs = [
25+
build-system = [ setuptools ];
26+
27+
dependencies = [
2428
six
2529
mypy-extensions
2630
];
@@ -32,11 +36,20 @@ buildPythonPackage rec {
3236
"pyannotate_tools"
3337
];
3438

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+
];
47+
3548
meta = with lib; {
3649
description = "Auto-generate PEP-484 annotations";
37-
mainProgram = "pyannotate";
3850
homepage = "https://github.com/dropbox/pyannotate";
3951
license = licenses.mit;
4052
maintainers = [ ];
53+
mainProgram = "pyannotate";
4154
};
4255
}

0 commit comments

Comments
 (0)