summary refs log tree commit diff
path: root/pkgs/development/tools/prospector/default.nix
blob: e53760f54afaf9683b6914defc7ac31d924a897f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{ lib
, fetchFromGitHub
, python3
}:

let
  setoptconf-tmp = python3.pkgs.callPackage ./setoptconf.nix { };
in

python3.pkgs.buildPythonApplication rec {
  pname = "prospector";
  version = "1.8.4";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "PyCQA";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-g7tyn6pj5I/+b28wIitqDapR5ffk1xDEAtcYs2TpIUk=";
  };

  pythonRelaxDeps = [
    "pyflakes"
    "pep8-naming"
    "flake8"
  ];

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = with python3.pkgs; [
    bandit
    dodgy
    flake8
    gitpython
    mccabe
    mypy
    pep8-naming
    pycodestyle
    pydocstyle
    pyflakes
    pylint
    pylint-celery
    pylint-django
    pylint-flask
    pylint-plugin-utils
    pyroma
    pyyaml
    requirements-detector
    setoptconf-tmp
    setuptools
    toml
    vulture
  ];

  nativeCheckInputs = with python3.pkgs; [
    pytestCheckHook
  ];

  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";
    changelog = "https://github.com/PyCQA/prospector/blob/v${version}/CHANGELOG.rst";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ kamadorueda ];
  };
}