From 443f1a43ef629f1d0394641d769ef0c97f583404 Mon Sep 17 00:00:00 2001 From: Kier Davis Date: Sun, 27 Oct 2019 18:44:30 +0000 Subject: [PATCH] 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 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 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 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. --- pkgs/development/python-modules/pylint/1.9.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pylint/1.9.nix b/pkgs/development/python-modules/pylint/1.9.nix index 571a9446e116..b1253c65b338 100644 --- a/pkgs/development/python-modules/pylint/1.9.nix +++ b/pkgs/development/python-modules/pylint/1.9.nix @@ -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