1{ stdenv, lib, buildPythonPackage, fetchPypi, python, astroid, six, isort,
2 mccabe, configparser, backports_functools_lru_cache, singledispatch,
3 pytest, pytestrunner, pyenchant }:
4
5buildPythonPackage rec {
6 pname = "pylint";
7 version = "1.9.4";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "ee1e85575587c5b58ddafa25e1c1b01691ef172e139fc25585e5d3f02451da93";
12 };
13
14 checkInputs = [ pytest pytestrunner pyenchant ];
15
16 propagatedBuildInputs = [ astroid six isort mccabe configparser backports_functools_lru_cache singledispatch ];
17
18 postPatch = lib.optionalString stdenv.isDarwin ''
19 # Remove broken darwin test
20 rm -vf pylint/test/test_functional.py
21 '';
22
23 checkPhase = ''
24 pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
25 [ # Broken test
26 "test_good_comprehension_checks"
27 # See PyCQA/pylint#2535
28 "test_libmodule" ] ++
29 # Disable broken darwin tests
30 lib.optionals stdenv.isDarwin [
31 "test_parallel_execution"
32 "test_py3k_jobs_option"
33 ]
34 )}"
35 '';
36
37 postInstall = ''
38 mkdir -p $out/share/emacs/site-lisp
39 cp "elisp/"*.el $out/share/emacs/site-lisp/
40 '';
41
42 meta = with lib; {
43 homepage = https://github.com/PyCQA/pylint;
44 description = "A bug and style checker for Python";
45 platforms = platforms.all;
46 license = licenses.gpl1Plus;
47 maintainers = with maintainers; [ nand0p ];
48 };
49}