Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to reinstall pip packages on every Puppet run #59

Closed
mcandre opened this issue Feb 9, 2014 · 3 comments
Closed

Don't try to reinstall pip packages on every Puppet run #59

mcandre opened this issue Feb 9, 2014 · 3 comments

Comments

@mcandre
Copy link

mcandre commented Feb 9, 2014

Only install a pip package when it's missing.

@giavac
Copy link
Contributor

giavac commented Mar 7, 2014

FWIW, this gets my vote.

@CpuID
Copy link

CpuID commented Mar 18, 2014

In theory this should already be the case? There is an onlyif pip freeze hiding in there?

@giavac
Copy link
Contributor

giavac commented Mar 18, 2014

There is
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
but only when $ensure is 'present'.
If $ensure is 'latest', then the unless condition is omitted.
I think I see now how it works and, in the absence of a better way to check the version of the current latest candidate, it seems reasonable.

What about using the output of pip search though? That'll tell us whether the INSTALLED version is the same as the LATEST, and could trigger the installation with an unless cause.

giavac added a commit to giavac/puppet-python that referenced this issue Mar 18, 2014
… Even if ensure latest, do not install if already latest
stankevich added a commit that referenced this issue Mar 18, 2014
Don't try to reinstall pip packages on every Puppet run #59
shivapoudel pushed a commit that referenced this issue Sep 1, 2015
…ensure latest, do not install if already latest
stankevich added a commit that referenced this issue Sep 1, 2015
Don't try to reinstall pip packages on every Puppet run #59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants