2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-08-12 12:06:08 +00:00
|
|
|
, pint
|
2022-06-26 10:26:21 +00:00
|
|
|
, pythonOlder
|
2021-02-05 17:12:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, toml
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vulture";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.5";
|
2022-06-26 10:26:21 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-KDFpQFXrLjagnDt2gJNINxArm2wJaSBuOQLVE2Ehd8M=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov vulture --cov-report=html --cov-report=term --cov-report=xml --cov-append" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
toml
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pint
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"vulture"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Finds unused code in Python programs";
|
|
|
|
homepage = "https://github.com/jendrikseipp/vulture";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mcwitt ];
|
|
|
|
};
|
|
|
|
}
|