nixpkgs/pkgs/development/python-modules/pylint/default.nix

56 lines
1.4 KiB
Nix
Raw Normal View History

2020-09-19 05:20:00 +01:00
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, astroid, installShellFiles,
isort, mccabe, pytestCheckHook, pytest-benchmark, pytestrunner, toml }:
2017-09-06 16:28:21 +01:00
buildPythonPackage rec {
pname = "pylint";
2020-09-19 05:20:00 +01:00
version = "2.6.0";
2018-07-24 16:53:48 +01:00
2020-09-19 05:20:00 +01:00
disabled = pythonOlder "3.5";
2017-09-06 16:28:21 +01:00
src = fetchPypi {
inherit pname version;
2020-09-19 05:20:00 +01:00
sha256 = "bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210";
2017-09-06 16:28:21 +01:00
};
2020-09-19 05:20:00 +01:00
nativeBuildInputs = [ pytestrunner installShellFiles ];
checkInputs = [ pytestCheckHook pytest-benchmark ];
2017-09-06 16:28:21 +01:00
2020-06-25 13:08:50 +01:00
propagatedBuildInputs = [ astroid isort mccabe toml ];
2017-09-06 16:28:21 +01:00
2018-08-31 02:14:41 +01:00
postPatch = lib.optionalString stdenv.isDarwin ''
2018-07-24 16:53:48 +01:00
# Remove broken darwin test
2017-09-06 16:28:21 +01:00
rm -vf pylint/test/test_functional.py
'';
2019-10-17 08:41:52 +01:00
disabledTests = [
# https://github.com/PyCQA/pylint/issues/3198
"test_by_module_statement_value"
# has issues with local directories
"test_version"
2019-10-17 08:41:52 +01:00
] ++ lib.optionals stdenv.isDarwin [
"test_parallel_execution"
"test_py3k_jobs_option"
];
# calls executable in one of the tests
preCheck = ''
export PATH=$PATH:$out/bin
'';
2019-10-17 08:41:52 +01:00
dontUseSetuptoolsCheck = true;
2017-09-06 16:28:21 +01:00
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
cp "elisp/"*.el $out/share/emacs/site-lisp/
2020-09-19 05:20:00 +01:00
installManPage man/*.1
2017-09-06 16:28:21 +01:00
'';
2018-08-31 02:14:41 +01:00
meta = with lib; {
2020-09-19 05:20:00 +01:00
homepage = "https://pylint.pycqa.org/";
2017-09-06 16:28:21 +01:00
description = "A bug and style checker for Python";
license = licenses.gpl1Plus;
maintainers = with maintainers; [ nand0p ];
};
}