2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, astroid, six, isort,
|
2018-08-31 02:14:41 +01:00
|
|
|
mccabe, configparser, backports_functools_lru_cache, singledispatch,
|
2020-06-28 12:53:51 +01:00
|
|
|
pytest, pytestrunner, setuptools }:
|
2018-08-31 02:14:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylint";
|
2019-09-13 13:49:55 +01:00
|
|
|
version = "1.9.5";
|
2018-08-31 02:14:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-09-13 16:31:01 +01:00
|
|
|
sha256 = "004kfapkqxqy2s85pmddqv0fabxdxywxrlbi549p0v237pr2v94p";
|
2018-08-31 02:14:41 +01:00
|
|
|
};
|
|
|
|
|
2020-06-28 12:53:51 +01:00
|
|
|
checkInputs = [ pytest pytestrunner ];
|
2018-08-31 02:14:41 +01:00
|
|
|
|
2019-10-27 18:44:30 +00:00
|
|
|
propagatedBuildInputs = [ astroid six isort mccabe configparser backports_functools_lru_cache singledispatch setuptools ];
|
2018-08-31 02:14:41 +01:00
|
|
|
|
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
# Remove broken darwin test
|
|
|
|
rm -vf pylint/test/test_functional.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
|
|
|
|
[ # Broken test
|
|
|
|
"test_good_comprehension_checks"
|
2019-09-13 13:49:55 +01:00
|
|
|
# requires setuptools
|
|
|
|
"test_pkginfo"
|
2018-08-31 02:14:41 +01:00
|
|
|
# See PyCQA/pylint#2535
|
|
|
|
"test_libmodule" ] ++
|
|
|
|
# Disable broken darwin tests
|
|
|
|
lib.optionals stdenv.isDarwin [
|
|
|
|
"test_parallel_execution"
|
|
|
|
"test_py3k_jobs_option"
|
|
|
|
]
|
|
|
|
)}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/emacs/site-lisp
|
|
|
|
cp "elisp/"*.el $out/share/emacs/site-lisp/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/PyCQA/pylint";
|
2018-08-31 02:14:41 +01:00
|
|
|
description = "A bug and style checker for Python";
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl1Plus;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|