2018-08-31 02:14:41 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, python, pythonOlder, astroid,
|
|
|
|
isort, mccabe, pytest, pytestrunner, pyenchant }:
|
2017-03-03 01:51:55 +00:00
|
|
|
|
2017-09-06 16:28:21 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylint";
|
2018-08-13 08:30:48 +01:00
|
|
|
version = "2.1.1";
|
2018-07-24 16:53:48 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4";
|
2017-09-06 16:28:21 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-08-13 08:30:48 +01:00
|
|
|
sha256 = "31142f764d2a7cd41df5196f9933b12b7ee55e73ef12204b648ad7e556c119fb";
|
2017-09-06 16:28:21 +01:00
|
|
|
};
|
|
|
|
|
2018-08-31 02:14:41 +01:00
|
|
|
checkInputs = [ pytest pytestrunner pyenchant ];
|
2017-09-06 16:28:21 +01:00
|
|
|
|
2018-07-24 16:53:48 +01:00
|
|
|
propagatedBuildInputs = [ astroid isort mccabe ];
|
2017-09-06 16:28:21 +01:00
|
|
|
|
2018-08-31 02:14:41 +01:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
2018-07-24 16:53:48 +01:00
|
|
|
# Remove broken darwin test
|
2017-09-06 16:28:21 +01:00
|
|
|
rm -vf pylint/test/test_functional.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
2018-08-31 02:14:41 +01:00
|
|
|
pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
|
|
|
|
# Broken test
|
|
|
|
[ "test_good_comprehension_checks" ] ++
|
|
|
|
# Disable broken darwin tests
|
|
|
|
lib.optionals stdenv.isDarwin [
|
|
|
|
"test_parallel_execution"
|
|
|
|
"test_py3k_jobs_option"
|
|
|
|
]
|
|
|
|
)}"
|
2017-09-06 16:28:21 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/emacs/site-lisp
|
|
|
|
cp "elisp/"*.el $out/share/emacs/site-lisp/
|
|
|
|
'';
|
|
|
|
|
2018-08-31 02:14:41 +01:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/PyCQA/pylint;
|
2017-09-06 16:28:21 +01:00
|
|
|
description = "A bug and style checker for Python";
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl1Plus;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|