at 22.05-pre 1.5 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, pythonOlder 6, installShellFiles 7, astroid 8, isort 9, mccabe 10, platformdirs 11, toml 12, pytest-benchmark 13, pytest-xdist 14, pytestCheckHook 15}: 16 17buildPythonPackage rec { 18 pname = "pylint"; 19 version = "2.11.1"; 20 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "PyCQA"; 25 repo = pname; 26 rev = "v${version}"; 27 sha256 = "08kc9139v1sd0vhna0rqikyds0xq8hxv0j9707n2i1nbv2z6xhsv"; 28 }; 29 30 nativeBuildInputs = [ 31 installShellFiles 32 ]; 33 34 propagatedBuildInputs = [ 35 astroid 36 isort 37 mccabe 38 platformdirs 39 toml 40 ]; 41 42 postInstall = '' 43 mkdir -p $out/share/emacs/site-lisp 44 cp -v "elisp/"*.el $out/share/emacs/site-lisp/ 45 installManPage man/*.1 46 ''; 47 48 checkInputs = [ 49 pytest-benchmark 50 pytest-xdist 51 pytestCheckHook 52 ]; 53 54 dontUseSetuptoolsCheck = true; 55 56 # calls executable in one of the tests 57 preCheck = '' 58 export PATH=$PATH:$out/bin 59 ''; 60 61 pytestFlagsArray = [ 62 "-n auto" 63 ]; 64 65 disabledTestPaths = [ 66 # tests miss multiple input files 67 # FileNotFoundError: [Errno 2] No such file or directory 68 "tests/pyreverse/test_writer.py" 69 ]; 70 71 disabledTests = lib.optionals stdenv.isDarwin [ 72 "test_parallel_execution" 73 "test_py3k_jobs_option" 74 ]; 75 76 meta = with lib; { 77 homepage = "https://pylint.pycqa.org/"; 78 description = "A bug and style checker for Python"; 79 license = licenses.gpl1Plus; 80 maintainers = with maintainers; [ ]; 81 }; 82}