mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 13:06:32 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
52 lines
1 KiB
Nix
52 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
mypy-extensions,
|
|
pytestCheckHook,
|
|
pythonAtLeast,
|
|
setuptools,
|
|
six,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyannotate";
|
|
version = "1.2.0";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-BO1YBLqzgVPVmB/JLYPc9qIog0U3aFYfBX53flwFdZk=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
six
|
|
mypy-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [
|
|
"pyannotate_runtime"
|
|
"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"
|
|
"pyannotate_tools/annotations/tests/dundermain_test.py"
|
|
];
|
|
|
|
meta = {
|
|
description = "Auto-generate PEP-484 annotations";
|
|
homepage = "https://github.com/dropbox/pyannotate";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
mainProgram = "pyannotate";
|
|
};
|
|
}
|