git.iko.soy/typeable/nixpkgs
on master help sign in
python2Packages.pylint: init at 1.9.2
commit67ea56717a54096f499b195a4f44d11fdbbcda2b authorBen Wolsieffer <benwolsieffer@gmail.com> dateThu 30 Aug 2018, 21:14 (8 years ago) parent4f09e05
3 files changed+66−12
pkgs/development/python-modules/pylint/1.9.nix+49 pkgs/development/python-modules/pylint/default.nix+15−11 pkgs/top-level/python-packages.nix+2−1
pkgs/development/python-modules/pylint/1.9.nixnew file+49
@@ -0,0 +1,49 @@
1+{ stdenv, lib, buildPythonPackage, fetchPypi, python, astroid, six, isort,
2+ mccabe, configparser, backports_functools_lru_cache, singledispatch,
3+ pytest, pytestrunner, pyenchant }:
4+
5+buildPythonPackage rec {
6+ pname = "pylint";
7+ version = "1.9.2";
8+
9+ src = fetchPypi {
10+ inherit pname version;
11+ sha256 = "1cxr1j037hsm4spmvl64v2j2rdq72pc2z0gnn3iggd4np6y21wpz";
12+ };
13+
14+ checkInputs = [ pytest pytestrunner pyenchant ];
15+
16+ propagatedBuildInputs = [ astroid six isort mccabe configparser backports_functools_lru_cache singledispatch ];
17+
18+ postPatch = lib.optionalString stdenv.isDarwin ''
19+ # Remove broken darwin test
20+ rm -vf pylint/test/test_functional.py
21+ '';
22+
23+ checkPhase = ''
24+ pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
25+ [ # Broken test
26+ "test_good_comprehension_checks"
27+ # See PyCQA/pylint#2535
28+ "test_libmodule" ] ++
29+ # Disable broken darwin tests
30+ lib.optionals stdenv.isDarwin [
31+ "test_parallel_execution"
32+ "test_py3k_jobs_option"
33+ ]
34+ )}"
35+ '';
36+
37+ postInstall = ''
38+ mkdir -p $out/share/emacs/site-lisp
39+ cp "elisp/"*.el $out/share/emacs/site-lisp/
40+ '';
41+
42+ meta = with lib; {
43+ homepage = https://github.com/PyCQA/pylint;
44+ description = "A bug and style checker for Python";
45+ platforms = platforms.all;
46+ license = licenses.gpl1Plus;
47+ maintainers = with maintainers; [ nand0p ];
48+ };
49+}
pkgs/development/python-modules/pylint/default.nix+15−11
@@ -1,5 +1,5 @@
1−{ stdenv, buildPythonPackage, fetchPypi, python, pythonOlder, astroid, isort,
2− pytest, pytestrunner, mccabe, pytest_xdist, pyenchant }:
1+{ stdenv, lib, buildPythonPackage, fetchPypi, python, pythonOlder, astroid,
2+ isort, mccabe, pytest, pytestrunner, pyenchant }:
33
44buildPythonPackage rec {
55 pname = "pylint";
@@ -12,21 +12,25 @@ buildPythonPackage rec {
1212 sha256 = "31142f764d2a7cd41df5196f9933b12b7ee55e73ef12204b648ad7e556c119fb";
1313 };
1414
15− checkInputs = [ pytest pytestrunner pytest_xdist pyenchant ];
15+ checkInputs = [ pytest pytestrunner pyenchant ];
1616
1717 propagatedBuildInputs = [ astroid isort mccabe ];
1818
19− postPatch = ''
19+ postPatch = lib.optionalString stdenv.isDarwin ''
2020 # Remove broken darwin test
2121 rm -vf pylint/test/test_functional.py
2222 '';
2323
2424 checkPhase = ''
25− cat pylint/test/test_self.py
26− # Disable broken darwin tests
27− pytest pylint/test -k "not test_parallel_execution \
28− and not test_py3k_jobs_option \
29− and not test_good_comprehension_checks"
25+ pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
26+ # Broken test
27+ [ "test_good_comprehension_checks" ] ++
28+ # Disable broken darwin tests
29+ lib.optionals stdenv.isDarwin [
30+ "test_parallel_execution"
31+ "test_py3k_jobs_option"
32+ ]
33+ )}"
3034 '';
3135
3236 postInstall = ''
@@ -34,8 +38,8 @@ buildPythonPackage rec {
3438 cp "elisp/"*.el $out/share/emacs/site-lisp/
3539 '';
3640
37− meta = with stdenv.lib; {
38− homepage = https://www.logilab.org/project/pylint;
41+ meta = with lib; {
42+ homepage = https://github.com/PyCQA/pylint;
3943 description = "A bug and style checker for Python";
4044 platforms = platforms.all;
4145 license = licenses.gpl1Plus;
pkgs/top-level/python-packages.nix+2−1
@@ -10227,7 +10227,8 @@ in {
1022710227
1022810228 pygpgme = callPackage ../development/python-modules/pygpgme { };
1022910229
10230− pylint = callPackage ../development/python-modules/pylint { };
10230+ pylint = if isPy3k then callPackage ../development/python-modules/pylint { }
10231+ else callPackage ../development/python-modules/pylint/1.9.nix { };
1023110232
1023210233 pyopencl = callPackage ../development/python-modules/pyopencl { };
1023310234