pythonPackages.pylint: add setuptools

Previously it was missing a runtime dependency on setuptools:

    [kier@saelli:~/checkouts/nixpkgs]$ $(nix-build -A python27Packages.pylint --no-out-link)/bin/pylint
    Traceback (most recent call last):
      File "/nix/store/0k8h6n6nxjcs2j5jp54mfppjbx37hrrg-python2.7-pylint-1.9.5/bin/.pylint-wrapped", line 6, in <module>
        from pylint import run_pylint
      File "/nix/store/0k8h6n6nxjcs2j5jp54mfppjbx37hrrg-python2.7-pylint-1.9.5/lib/python2.7/site-packages/pylint/__init__.py", line 11, in <module>
        from .__pkginfo__ import version as __version__
      File "/nix/store/0k8h6n6nxjcs2j5jp54mfppjbx37hrrg-python2.7-pylint-1.9.5/lib/python2.7/site-packages/pylint/__pkginfo__.py", line 25, in <module>
        from pkg_resources import parse_version
    ImportError: No module named pkg_resources

With this change, the same command now correctly prints pylint's help text.

This only applies to Python 2.
This commit is contained in:
Kier Davis 2019-10-27 18:44:30 +00:00 committed by Frederik Rietdijk
parent 9d37be21a7
commit 443f1a43ef

View File

@ -1,6 +1,6 @@
{ stdenv, lib, buildPythonPackage, fetchPypi, astroid, six, isort,
mccabe, configparser, backports_functools_lru_cache, singledispatch,
pytest, pytestrunner, pyenchant }:
pytest, pytestrunner, pyenchant, setuptools }:
buildPythonPackage rec {
pname = "pylint";
@ -13,7 +13,7 @@ buildPythonPackage rec {
checkInputs = [ pytest pytestrunner pyenchant ];
propagatedBuildInputs = [ astroid six isort mccabe configparser backports_functools_lru_cache singledispatch ];
propagatedBuildInputs = [ astroid six isort mccabe configparser backports_functools_lru_cache singledispatch setuptools ];
postPatch = lib.optionalString stdenv.isDarwin ''
# Remove broken darwin test