Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 50 lines 1.3 kB view raw
1{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, astroid, 2 isort, mccabe, pytest, pytestrunner }: 3 4buildPythonPackage rec { 5 pname = "pylint"; 6 version = "2.3.1"; 7 8 disabled = pythonOlder "3.4"; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "1wgzq0da87m7708hrc9h4bc5m4z2p7379i4xyydszasmjns3sgkj"; 13 }; 14 15 nativeBuildInputs = [ pytestrunner ]; 16 17 checkInputs = [ pytest ]; 18 19 propagatedBuildInputs = [ astroid isort mccabe ]; 20 21 postPatch = lib.optionalString stdenv.isDarwin '' 22 # Remove broken darwin test 23 rm -vf pylint/test/test_functional.py 24 ''; 25 26 checkPhase = '' 27 pytest pylint/test -k "not ${lib.concatStringsSep " and not " ( 28 # Broken tests 29 [ "member_checks_py37" "iterable_context_py36" ] ++ 30 # Disable broken darwin tests 31 lib.optionals stdenv.isDarwin [ 32 "test_parallel_execution" 33 "test_py3k_jobs_option" 34 ] 35 )}" 36 ''; 37 38 postInstall = '' 39 mkdir -p $out/share/emacs/site-lisp 40 cp "elisp/"*.el $out/share/emacs/site-lisp/ 41 ''; 42 43 meta = with lib; { 44 homepage = https://github.com/PyCQA/pylint; 45 description = "A bug and style checker for Python"; 46 platforms = platforms.all; 47 license = licenses.gpl1Plus; 48 maintainers = with maintainers; [ nand0p ]; 49 }; 50}