{ stdenv , lib , buildPythonPackage , fetchFromGitHub , pythonOlder , installShellFiles , astroid , isort , GitPython , mccabe , platformdirs , toml , pytest-benchmark , pytest-xdist , pytestCheckHook }: buildPythonPackage rec { pname = "pylint"; version = "2.12.2"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "PyCQA"; repo = pname; rev = "v${version}"; sha256 = "sha256-seBYBTB+8PLIovqxVohkoQEfDAZI1fehLgXuHeTx9Wo="; }; 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 = [ GitPython pytest-benchmark pytest-xdist pytestCheckHook ]; dontUseSetuptoolsCheck = true; # calls executable in one of the tests preCheck = '' export PATH=$PATH:$out/bin export HOME=$TEMPDIR ''; 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; [ ]; }; }