From fe2f65b8c4d7b2d315086e684c756ab1f234341c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 20 Dec 2022 17:30:03 +0100 Subject: [PATCH] prospector: 1.7.7 -> 1.8.3 Diff: https://github.com/PyCQA/prospector/compare/refs/tags/v1.7.7...v1.8.3 --- pkgs/development/tools/prospector/default.nix | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/pkgs/development/tools/prospector/default.nix b/pkgs/development/tools/prospector/default.nix index d2855861dc8f..5594e7e083e9 100644 --- a/pkgs/development/tools/prospector/default.nix +++ b/pkgs/development/tools/prospector/default.nix @@ -7,29 +7,34 @@ let setoptconf-tmp = python3.pkgs.callPackage ./setoptconf.nix { }; in -with python3.pkgs; - -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "prospector"; - version = "1.7.7"; + version = "1.8.3"; format = "pyproject"; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "PyCQA"; repo = pname; - rev = version; - hash = "sha256-sbPZmVeJtNphtjuZEfKcUgty9bJ3E/2Ya9RuX3u/XEs="; + rev = "refs/tags/v${version}"; + hash = "sha256-R3Sc4Qx6bht+XJhNj+fy32akzDOgSDF5LP3WE1qEyms="; }; - nativeBuildInputs = [ - poetry-core + pythonRelaxDeps = [ + "pyflakes" + "pep8-naming" + "flake8" ]; - propagatedBuildInputs = [ + nativeBuildInputs = with python3.pkgs; [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = with python3.pkgs; [ bandit dodgy + flake8 + gitpython mccabe mypy pep8-naming @@ -50,22 +55,20 @@ buildPythonApplication rec { vulture ]; - checkInputs = [ + checkInputs = with python3.pkgs; [ pytestCheckHook ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'requirements-detector = "^0.7"' 'requirements-detector = "*"' \ - --replace 'pep8-naming = ">=0.3.3,<=0.10.0"' 'pep8-naming = "*"' \ - --replace 'mccabe = "^0.6.0"' 'mccabe = "*"' \ - --replace 'pycodestyle = ">=2.6.0,<2.9.0"' 'pycodestyle = "*"' - ''; - pythonImportsCheck = [ "prospector" ]; + disabledTestPaths = [ + # distutils.errors.DistutilsArgError: no commands supplied + "tests/tools/pyroma/test_pyroma_tool.py" + ]; + + meta = with lib; { description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity"; homepage = "https://github.com/PyCQA/prospector";