nixpkgs/pkgs/development/python-modules/pylint/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2017-09-06 17:28:21 +02:00
{ stdenv, buildPythonPackage, fetchPypi, python, astroid, isort,
pytest, pytestrunner, mccabe, configparser, backports_functools_lru_cache }:
2017-09-06 17:28:21 +02:00
buildPythonPackage rec {
pname = "pylint";
2018-06-12 18:47:05 +02:00
version = "1.9.2";
2017-09-06 17:28:21 +02:00
src = fetchPypi {
inherit pname version;
2018-06-12 18:47:05 +02:00
sha256 = "fff220bcb996b4f7e2b0f6812fd81507b72ca4d8c4d05daf2655c333800cb9b3";
2017-09-06 17:28:21 +02:00
};
buildInputs = [ pytest pytestrunner mccabe configparser backports_functools_lru_cache ];
propagatedBuildInputs = [ astroid configparser isort mccabe ];
2017-09-06 17:28:21 +02:00
postPatch = ''
# Remove broken darwin tests
sed -i -e '/test_parallel_execution/,+2d' pylint/test/test_self.py
sed -i -e '/test_py3k_jobs_option/,+4d' pylint/test/test_self.py
rm -vf pylint/test/test_functional.py
'';
checkPhase = ''
cd pylint/test
${python.interpreter} -m unittest discover -p "*test*"
'';
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
cp "elisp/"*.el $out/share/emacs/site-lisp/
'';
meta = with stdenv.lib; {
2018-06-27 22:12:57 +02:00
homepage = https://www.logilab.org/project/pylint;
2017-09-06 17:28:21 +02:00
description = "A bug and style checker for Python";
platforms = platforms.all;
license = licenses.gpl1Plus;
maintainers = with maintainers; [ nand0p ];
};
}