2019-06-16 21:59:06 +02:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, astroid,
|
2019-04-28 01:28:20 +02:00
|
|
|
isort, mccabe, pytest, pytestrunner }:
|
2017-03-03 02:51:55 +01:00
|
|
|
|
2017-09-06 17:28:21 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylint";
|
2019-05-17 23:26:49 +02:00
|
|
|
version = "2.3.1";
|
2018-07-24 17:53:48 +02:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4";
|
2017-09-06 17:28:21 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-05-17 23:26:49 +02:00
|
|
|
sha256 = "1wgzq0da87m7708hrc9h4bc5m4z2p7379i4xyydszasmjns3sgkj";
|
2017-09-06 17:28:21 +02:00
|
|
|
};
|
|
|
|
|
2019-03-26 15:32:21 +01:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
|
|
|
|
2019-04-28 01:28:20 +02:00
|
|
|
checkInputs = [ pytest ];
|
2017-09-06 17:28:21 +02:00
|
|
|
|
2018-07-24 17:53:48 +02:00
|
|
|
propagatedBuildInputs = [ astroid isort mccabe ];
|
2017-09-06 17:28:21 +02:00
|
|
|
|
2018-08-31 03:14:41 +02:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
2018-07-24 17:53:48 +02:00
|
|
|
# Remove broken darwin test
|
2017-09-06 17:28:21 +02:00
|
|
|
rm -vf pylint/test/test_functional.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
2018-08-31 03:14:41 +02:00
|
|
|
pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
|
2018-12-02 23:35:07 +01:00
|
|
|
# Broken tests
|
|
|
|
[ "member_checks_py37" "iterable_context_py36" ] ++
|
2018-08-31 03:14:41 +02:00
|
|
|
# Disable broken darwin tests
|
|
|
|
lib.optionals stdenv.isDarwin [
|
|
|
|
"test_parallel_execution"
|
|
|
|
"test_py3k_jobs_option"
|
|
|
|
]
|
|
|
|
)}"
|
2017-09-06 17:28:21 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/emacs/site-lisp
|
|
|
|
cp "elisp/"*.el $out/share/emacs/site-lisp/
|
|
|
|
'';
|
|
|
|
|
2018-08-31 03:14:41 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/PyCQA/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 ];
|
|
|
|
};
|
|
|
|
}
|