python311Packages.vulture: refactor

This commit is contained in:
Fabian Affolter 2023-11-25 10:12:57 +01:00
parent b669aa3ffc
commit ebffaa5f3a

View file

@ -2,17 +2,19 @@
, buildPythonPackage
, fetchPypi
, pint
, pythonOlder
, pytestCheckHook
, pythonOlder
, setuptools
, toml
, tomli
}:
buildPythonPackage rec {
pname = "vulture";
version = "2.10";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
@ -24,13 +26,18 @@ buildPythonPackage rec {
--replace " --cov vulture --cov-report=html --cov-report=term --cov-report=xml --cov-append" ""
'';
propagatedBuildInputs = [
toml
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
tomli
];
nativeCheckInputs = [
pint
pytestCheckHook
toml
];
pythonImportsCheck = [
@ -40,6 +47,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Finds unused code in Python programs";
homepage = "https://github.com/jendrikseipp/vulture";
changelog = "https://github.com/jendrikseipp/vulture/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ mcwitt ];
};