python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / prospector / default.nix
blobd2855861dc8fc8bed334bf51e6bc0d4acf8234eb
1 { lib
2 , fetchFromGitHub
3 , python3
4 }:
6 let
7   setoptconf-tmp = python3.pkgs.callPackage ./setoptconf.nix { };
8 in
10 with python3.pkgs;
12 buildPythonApplication rec {
13   pname = "prospector";
14   version = "1.7.7";
15   format = "pyproject";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "PyCQA";
21     repo = pname;
22     rev = version;
23     hash = "sha256-sbPZmVeJtNphtjuZEfKcUgty9bJ3E/2Ya9RuX3u/XEs=";
24   };
26   nativeBuildInputs = [
27     poetry-core
28   ];
30   propagatedBuildInputs = [
31     bandit
32     dodgy
33     mccabe
34     mypy
35     pep8-naming
36     pycodestyle
37     pydocstyle
38     pyflakes
39     pylint
40     pylint-celery
41     pylint-django
42     pylint-flask
43     pylint-plugin-utils
44     pyroma
45     pyyaml
46     requirements-detector
47     setoptconf-tmp
48     setuptools
49     toml
50     vulture
51   ];
53   checkInputs = [
54     pytestCheckHook
55   ];
57   postPatch = ''
58     substituteInPlace pyproject.toml \
59       --replace 'requirements-detector = "^0.7"' 'requirements-detector = "*"' \
60       --replace 'pep8-naming = ">=0.3.3,<=0.10.0"' 'pep8-naming = "*"' \
61       --replace 'mccabe = "^0.6.0"' 'mccabe = "*"' \
62       --replace 'pycodestyle = ">=2.6.0,<2.9.0"' 'pycodestyle = "*"'
63   '';
65   pythonImportsCheck = [
66     "prospector"
67   ];
69   meta = with lib; {
70     description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity";
71     homepage = "https://github.com/PyCQA/prospector";
72     license = licenses.gpl2Plus;
73     maintainers = with maintainers; [ kamadorueda ];
74   };