{ stdenv , lib , buildPythonPackage , fetchFromGitHub , pythonOlder , installShellFiles , astroid , isort , mccabe , platformdirs , toml , pytest-benchmark , pytest-xdist , pytestCheckHook }: buildPythonPackage rec { pname = "pylint"; version = "2.10.2"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "PyCQA"; repo = pname; rev = "v${version}"; sha256 = "sha256-hkrkgUdC5LO1oSPFL6gvIk0zFpMw45gCmnoRbdPZuRs="; }; 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; [ ]; }; }