depot/third_party/nixpkgs/pkgs/development/python-modules/pylint/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

82 lines
1.4 KiB
Nix

{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, installShellFiles
, astroid
, isort
, mccabe
, platformdirs
, toml
, pytest-benchmark
, pytest-xdist
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pylint";
version = "2.11.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = "v${version}";
sha256 = "08kc9139v1sd0vhna0rqikyds0xq8hxv0j9707n2i1nbv2z6xhsv";
};
nativeBuildInputs = [
installShellFiles
];
propagatedBuildInputs = [
astroid
isort
mccabe
platformdirs
toml
];
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
cp -v "elisp/"*.el $out/share/emacs/site-lisp/
installManPage man/*.1
'';
checkInputs = [
pytest-benchmark
pytest-xdist
pytestCheckHook
];
dontUseSetuptoolsCheck = true;
# calls executable in one of the tests
preCheck = ''
export PATH=$PATH:$out/bin
'';
pytestFlagsArray = [
"-n auto"
];
disabledTestPaths = [
# tests miss multiple input files
# FileNotFoundError: [Errno 2] No such file or directory
"tests/pyreverse/test_writer.py"
];
disabledTests = lib.optionals stdenv.isDarwin [
"test_parallel_execution"
"test_py3k_jobs_option"
];
meta = with lib; {
homepage = "https://pylint.pycqa.org/";
description = "A bug and style checker for Python";
license = licenses.gpl1Plus;
maintainers = with maintainers; [ ];
};
}