You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 2, 2018. It is now read-only.
[COOK-3903] - python_pip resource will always try and update setuptools #81
The python_pip resource uses the pip freeze command to find the currently installed version of a python package (providers/pip.rb line 111). However, pip freeze does not include the pip and setuptools packages, and as a resource installing either package will always assume the package is not installed and reinstall it, even when the latest version of the package is installed. For instance, the supervisor cookbook will always upgrade setuptools (link).
silviu dicu added a comment - 07/Nov/13 9:16 AM
Hi - this is hardcoded into the pip source code - https://github.com/pypa/pip/blob/develop/pip/util.py#L350
Two solutions
have pip change the logic
have a different strategy into the python_pip provider
The code already has a special case for pip[1] - a very simple (if not particularly elegant) solution might be to also special case setuptools, using something like:
Activity
someara commentedon Jan 27, 2014
silviu dicu added a comment - 07/Nov/13 9:16 AM
Hi - this is hardcoded into the pip source code - https://github.com/pypa/pip/blob/develop/pip/util.py#L350
Two solutions
have pip change the logic
have a different strategy into the python_pip provider
mal commentedon Feb 6, 2014
I gave improving this a shot, but I'm not sure how to:
Commit is here for anyone interested: https://github.com/mal/chef-python/commit/f8651c70c2507e4f082265575d3b982c34d6ace5
Other approaches include using
easy_install --versionwhich will report versions for setuptools and/or distribute.borntyping commentedon Feb 27, 2014
The code already has a special case for
pip[1] - a very simple (if not particularly elegant) solution might be to also special casesetuptools, using something like:mal commentedon Mar 6, 2014
I found a more generic solution using
pip list, should do the job nicely 😀miketheman commentedon Jun 9, 2014
Bump.