Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Fix version detection (setuptools and distribute) #94

Merged
merged 1 commit into from Jun 30, 2014
Merged

Fix version detection (setuptools and distribute) #94

merged 1 commit into from Jun 30, 2014

Conversation

mal
Copy link
Contributor

@mal mal commented Mar 1, 2014

Fixes #81

The versions of distribute, pip, setuptools and wsgiref are excluded from the output of pip freeze, however they do show up in the output from pip list. This allows us to use a more general implentation of parsing the output from pip list to get the current version of all distributions.

Also removes a dependency on grep.

Distributions excluded from pip freeze:
https://github.com/pypa/pip/blob/2ad8888901c041b8f9aacebb3a16d55bf631e867/pip/util.py#L372

@miketheman
Copy link
Contributor

@coderanger We have been using this PR in our prod environment for a few weeks now, and can confirm that this has the desired behavior.
Prior to this, we had all sorts of problems, such as setuptools being reinstalled every run, and pip list is pretty much the way to go.

This PR has my 👍 , thanks @mal!

@mal mal closed this Jun 15, 2014
@mal mal deleted the version-detection branch June 15, 2014 07:28
@mal mal restored the version-detection branch June 15, 2014 07:31
@mal mal reopened this Jun 15, 2014
@mal
Copy link
Contributor Author

mal commented Jun 15, 2014

Leaving this open; but have forked the project to idio-cookbooks/python where this PR and any subsequent improvements will be maintained as master.

@mal
Copy link
Contributor Author

mal commented Jun 30, 2014

@coderanger any interest in this or shall I shut it down?

@coderanger
Copy link
Member

@mal Can you fix it to not use global variables? ($1)

The versions of `distribute`, `pip`, `setuptools` and `wsgiref` are
excluded from the output of `pip freeze`, however they do show up in the
output from `pip list`. This allows us to use a more general
implentation of parsing the output from `pip list` to get the current
version of all distributions.

Also removes a dependency on `grep`.

Distributions excluded from `pip freeze`:
/pypa/pip/blob/2ad8888901c041b8f9aacebb3a16d55bf631e867/pip/util.py#L372
@mal
Copy link
Contributor Author

mal commented Jun 30, 2014

@coderanger does that look about right?

@coderanger
Copy link
Member

Taking your word that the behavior is correct, but looks good on the code :-) There are some experiments going on with multi-threaded Chef so might as well keep things clean.

coderanger added a commit that referenced this pull request Jun 30, 2014
Fix version detection (setuptools and distribute)
@coderanger coderanger merged commit 56424ab into poise:master Jun 30, 2014
@mal
Copy link
Contributor Author

mal commented Jun 30, 2014

Cool, ta

@mal mal deleted the version-detection branch June 30, 2014 23:00
bjarocki added a commit to DataDog/chef-python that referenced this pull request Jul 3, 2014
…tion"

This reverts commit 56424ab, reversing
changes made to ec1dd90.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[COOK-3903] - python_pip resource will always try and update setuptools
3 participants