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

49 lines
1.3 KiB
Nix
Raw Normal View History

2018-08-31 01:14:41 +00:00
{ stdenv, lib, buildPythonPackage, fetchPypi, python, pythonOlder, astroid,
isort, mccabe, pytest, pytestrunner, pyenchant }:
2017-09-06 15:28:21 +00:00
buildPythonPackage rec {
pname = "pylint";
2018-12-02 22:20:28 +00:00
version = "2.2.2";
2018-07-24 15:53:48 +00:00
disabled = pythonOlder "3.4";
2017-09-06 15:28:21 +00:00
src = fetchPypi {
inherit pname version;
2018-12-02 22:20:28 +00:00
sha256 = "689de29ae747642ab230c6d37be2b969bf75663176658851f456619aacf27492";
2017-09-06 15:28:21 +00:00
};
2018-08-31 01:14:41 +00:00
checkInputs = [ pytest pytestrunner pyenchant ];
2017-09-06 15:28:21 +00:00
2018-07-24 15:53:48 +00:00
propagatedBuildInputs = [ astroid isort mccabe ];
2017-09-06 15:28:21 +00:00
2018-08-31 01:14:41 +00:00
postPatch = lib.optionalString stdenv.isDarwin ''
2018-07-24 15:53:48 +00:00
# Remove broken darwin test
2017-09-06 15:28:21 +00:00
rm -vf pylint/test/test_functional.py
'';
checkPhase = ''
2018-08-31 01:14:41 +00:00
pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
# Broken tests
[ "member_checks_py37" "iterable_context_py36" ] ++
2018-08-31 01:14:41 +00:00
# Disable broken darwin tests
lib.optionals stdenv.isDarwin [
"test_parallel_execution"
"test_py3k_jobs_option"
]
)}"
2017-09-06 15:28:21 +00:00
'';
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
cp "elisp/"*.el $out/share/emacs/site-lisp/
'';
2018-08-31 01:14:41 +00:00
meta = with lib; {
homepage = https://github.com/PyCQA/pylint;
2017-09-06 15:28:21 +00:00
description = "A bug and style checker for Python";
platforms = platforms.all;
license = licenses.gpl1Plus;
maintainers = with maintainers; [ nand0p ];
};
}