puppet-python
puppet-python copied to clipboard
Problem with pip - 'latest' and parse from freeze options
- Simple configuration:
python:
dev: latest
pip: latest
python_pips:
erl_terms:
ensure: 0.1.1
pkgname: erl_terms
psutil:
pkgname: psutil
CentOS 7.2/7.3
Using pip 'latest' doesn't work. Pip stays at 8.1.2.
- Parse unless with pip freeze
In your 'unless' statement, exemplary phrase:
pip freeze | grep -i -e ^erl_terms==0.1.1$ || pip list | sed -e 's/[ ]\+/==/' -e 's/[()]//g' | grep -i -e ^erl_terms==0.1.1
will always return notify due to:
You are using pip version 8.1.2, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. You are using pip version 8.1.2, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
After manual upgrade pip to 9.0.1, notify changes to:
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
This still generates notify event and installs pips on every puppet run.
I have the same issue. My workaround:
python::pip { 'pip':
ensure => '9.0.1',
install_args => `'--upgrade',
}
In my case pip argument requires a string not a hash, so no way to use workaround.
I'm not certain if it works for all version of pip , but using 'pip -q freeze | grep ...' quashes the 'consider upgrading' noise so that the behaviour of Exec[ ] with unless works like intended