75 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, installShellFiles
, astroid
, isort
, mccabe
, toml
, pytest-benchmark
, pytest-xdist
, pytestCheckHook
}:
2017-09-06 17:28:21 +02:00
buildPythonPackage rec {
pname = "pylint";
version = "2.7.1";
2018-07-24 17:53:48 +02:00
disabled = pythonOlder "3.6";
2017-09-06 17:28:21 +02:00
src = fetchPypi {
inherit pname version;
sha256 = "10nrvzk1naf5ryawmi59wp99k31053sz37q3x9li2hj2cf7i1kl1";
2017-09-06 17:28:21 +02:00
};
nativeBuildInputs = [
installShellFiles
];
propagatedBuildInputs = [
astroid
isort
mccabe
toml
];
2017-09-06 17:28:21 +02:00
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
cp -v "elisp/"*.el $out/share/emacs/site-lisp/
installManPage man/*.1
2017-09-06 17:28:21 +02:00
'';
checkInputs = [
pytest-benchmark
pytest-xdist
pytestCheckHook
];
dontUseSetuptoolsCheck = true;
2019-10-17 09:41:52 +02:00
# calls executable in one of the tests
preCheck = ''
export PATH=$PATH:$out/bin
'';
pytestFlagsArray = [
"-n auto"
];
2017-09-06 17:28:21 +02:00
disabledTests = lib.optionals stdenv.isDarwin [
"test_parallel_execution"
"test_py3k_jobs_option"
];
disabledTestPaths = lib.optional stdenv.isDarwin "pylint/test/test_functional.py";
2017-09-06 17:28:21 +02:00
2018-08-30 21:14:41 -04:00
meta = with lib; {
2020-09-19 04:20:00 +00:00
homepage = "https://pylint.pycqa.org/";
2017-09-06 17:28:21 +02:00
description = "A bug and style checker for Python";
license = licenses.gpl1Plus;
maintainers = with maintainers; [ nand0p ];
};
}