2019-06-16 19:59:06 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, astroid,
|
2020-06-08 19:42:14 +00:00
|
|
|
isort, mccabe, pytestCheckHook, pytest-benchmark, pytestrunner, toml }:
|
2017-03-03 01:51:55 +00:00
|
|
|
|
2017-09-06 15:28:21 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylint";
|
2020-07-31 08:56:44 +00:00
|
|
|
version = "2.5.3";
|
2018-07-24 15:53:48 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4";
|
2017-09-06 15:28:21 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-31 08:56:44 +00:00
|
|
|
sha256 = "7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc";
|
2017-09-06 15:28:21 +00:00
|
|
|
};
|
|
|
|
|
2020-06-25 12:08:50 +00:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2019-03-26 14:32:21 +00:00
|
|
|
|
2020-06-08 19:42:14 +00:00
|
|
|
checkInputs = [ pytestCheckHook pytest-benchmark ];
|
2017-09-06 15:28:21 +00:00
|
|
|
|
2020-06-25 12:08:50 +00:00
|
|
|
propagatedBuildInputs = [ astroid isort mccabe toml ];
|
2017-09-06 15:28:21 +00:00
|
|
|
|
2018-08-31 01:14:41 +00:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
2018-07-24 15:53:48 +00:00
|
|
|
# Remove broken darwin test
|
2017-09-06 15:28:21 +00:00
|
|
|
rm -vf pylint/test/test_functional.py
|
|
|
|
'';
|
|
|
|
|
2019-10-17 07:41:52 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/PyCQA/pylint/issues/3198
|
|
|
|
"test_by_module_statement_value"
|
2020-06-08 19:42:14 +00:00
|
|
|
# has issues with local directories
|
|
|
|
"test_version"
|
2019-10-17 07:41:52 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_parallel_execution"
|
|
|
|
"test_py3k_jobs_option"
|
|
|
|
];
|
|
|
|
|
2020-06-08 19:42:14 +00:00
|
|
|
# calls executable in one of the tests
|
|
|
|
preCheck = ''
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
'';
|
|
|
|
|
2019-10-17 07:41:52 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
2017-09-06 15:28:21 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/emacs/site-lisp
|
|
|
|
cp "elisp/"*.el $out/share/emacs/site-lisp/
|
|
|
|
'';
|
|
|
|
|
2018-08-31 01:14:41 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/PyCQA/pylint";
|
2017-09-06 15:28:21 +00:00
|
|
|
description = "A bug and style checker for Python";
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl1Plus;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|