Skip to content

Commit 3c3ba03

Browse files
committed
Pip: freeze all to be able to control setuptools, distribute, wheel, pip
By default `pip freeze` skip the mentioned packages and only displays their version if `--all` is used
1 parent bbb85bf commit 3c3ba03

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

manifests/pip.pp

+5-5
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
if $ensure != present and $ensure != latest {
216216
exec { "pip_install_${name}":
217217
command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args}@${ensure}#egg=${egg_name} || ${pip_install} ${install_args} ${pip_common_args}@${ensure}#egg=${egg_name} ;}",
218-
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
218+
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex}",
219219
user => $owner,
220220
group => $group,
221221
umask => $umask,
@@ -227,7 +227,7 @@
227227
} else {
228228
exec { "pip_install_${name}":
229229
command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args} || ${pip_install} ${install_args} ${pip_common_args} ;}",
230-
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
230+
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex}",
231231
user => $owner,
232232
group => $group,
233233
umask => $umask,
@@ -244,7 +244,7 @@
244244
# Explicit version.
245245
exec { "pip_install_${name}":
246246
command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args}==${ensure} || ${pip_install} ${install_args} ${pip_common_args}==${ensure} ;}",
247-
unless => "${pip_env} freeze | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
247+
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
248248
user => $owner,
249249
group => $group,
250250
umask => $umask,
@@ -259,7 +259,7 @@
259259
# Whatever version is available.
260260
exec { "pip_install_${name}":
261261
command => "${wheel_check} ; { ${pip_install} \$wheel_support_flag ${pip_common_args} || ${pip_install} ${pip_common_args} ;}",
262-
unless => "${pip_env} freeze | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
262+
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
263263
user => $owner,
264264
group => $group,
265265
umask => $umask,
@@ -289,7 +289,7 @@
289289
# Anti-action, uninstall.
290290
exec { "pip_uninstall_${name}":
291291
command => "echo y | ${pip_env} uninstall ${uninstall_args} ${proxy_flag} ${name}",
292-
onlyif => "${pip_env} freeze | grep -i -e ${grep_regex}",
292+
onlyif => "${pip_env} freeze --all | grep -i -e ${grep_regex}",
293293
user => $owner,
294294
group => $group,
295295
umask => $umask,

0 commit comments

Comments
 (0)