1{ stdenv, buildPythonPackage, fetchPypi, python, astroid, isort,
2 pytest, pytestrunner, mccabe, configparser, backports_functools_lru_cache }:
3
4buildPythonPackage rec {
5 name = "${pname}-${version}";
6 pname = "pylint";
7 version = "1.8.2";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "4fe3b99da7e789545327b75548cee6b511e4faa98afe268130fea1af4b5ec022";
12 };
13
14 buildInputs = [ pytest pytestrunner mccabe configparser backports_functools_lru_cache ];
15
16 propagatedBuildInputs = [ astroid configparser isort mccabe ];
17
18 postPatch = ''
19 # Remove broken darwin tests
20 sed -i -e '/test_parallel_execution/,+2d' pylint/test/test_self.py
21 sed -i -e '/test_py3k_jobs_option/,+4d' pylint/test/test_self.py
22 rm -vf pylint/test/test_functional.py
23 '';
24
25 checkPhase = ''
26 cd pylint/test
27 ${python.interpreter} -m unittest discover -p "*test*"
28 '';
29
30 postInstall = ''
31 mkdir -p $out/share/emacs/site-lisp
32 cp "elisp/"*.el $out/share/emacs/site-lisp/
33 '';
34
35 meta = with stdenv.lib; {
36 homepage = http://www.logilab.org/project/pylint;
37 description = "A bug and style checker for Python";
38 platforms = platforms.all;
39 license = licenses.gpl1Plus;
40 maintainers = with maintainers; [ nand0p ];
41 };
42}