Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pylint / default.nix
blob43183482ecebdc545f1fed9a4e6d4adc2a02aaad
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , fetchPypi
5 , pythonOlder
6 , installShellFiles
7 , astroid
8 , isort
9 , mccabe
10 , toml
11 , pytest-benchmark
12 , pytest-xdist
13 , pytestCheckHook
16 buildPythonPackage rec {
17   pname = "pylint";
18   version = "2.7.1";
20   disabled = pythonOlder "3.6";
22   src = fetchPypi {
23     inherit pname version;
24     sha256 = "10nrvzk1naf5ryawmi59wp99k31053sz37q3x9li2hj2cf7i1kl1";
25   };
27   nativeBuildInputs = [
28     installShellFiles
29   ];
31   propagatedBuildInputs = [
32     astroid
33     isort
34     mccabe
35     toml
36   ];
38   postInstall = ''
39     mkdir -p $out/share/emacs/site-lisp
40     cp -v "elisp/"*.el $out/share/emacs/site-lisp/
41     installManPage man/*.1
42   '';
44   checkInputs = [
45     pytest-benchmark
46     pytest-xdist
47     pytestCheckHook
48   ];
50   dontUseSetuptoolsCheck = true;
52   # calls executable in one of the tests
53   preCheck = ''
54     export PATH=$PATH:$out/bin
55   '';
57   pytestFlagsArray = [
58     "-n auto"
59   ];
61   disabledTests = lib.optionals stdenv.isDarwin [
62     "test_parallel_execution"
63     "test_py3k_jobs_option"
64   ];
66   meta = with lib; {
67     homepage = "https://pylint.pycqa.org/";
68     description = "A bug and style checker for Python";
69     license = licenses.gpl1Plus;
70     maintainers = with maintainers; [ nand0p ];
71   };