mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
python310Packages.pyannotate: switch to pytestCheckHook
- disable on obsolete Python releases - add pythonImportsCheck
This commit is contained in:
parent
069f9a077e
commit
9af97d3004
1 changed files with 21 additions and 13 deletions
|
@ -1,34 +1,42 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, mypy-extensions
|
||||||
|
, pytestCheckHook
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, six
|
, six
|
||||||
, mypy-extensions
|
|
||||||
, typing
|
|
||||||
, pytest
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
version = "1.2.0";
|
|
||||||
pname = "pyannotate";
|
pname = "pyannotate";
|
||||||
|
version = "1.2.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "16bm0mf7wxvy0lgmcs1p8n1ji8pnvj1jvj8zk3am70dkp825iv84";
|
hash = "sha256-BO1YBLqzgVPVmB/JLYPc9qIog0U3aFYfBX53flwFdZk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
propagatedBuildInputs = [
|
||||||
propagatedBuildInputs = [ six mypy-extensions ]
|
six
|
||||||
++ lib.optionals (pythonOlder "3.5") [ typing ];
|
mypy-extensions
|
||||||
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkInputs = [
|
||||||
py.test
|
pytestCheckHook
|
||||||
'';
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"pyannotate_runtime"
|
||||||
|
"pyannotate_tools"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/dropbox/pyannotate";
|
|
||||||
description = "Auto-generate PEP-484 annotations";
|
description = "Auto-generate PEP-484 annotations";
|
||||||
|
homepage = "https://github.com/dropbox/pyannotate";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = [ maintainers.costrouc ];
|
maintainers = with maintainers; [ costrouc ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue