Skip to content

Commit

Permalink
Pip: freeze all to be able to control setuptools, distribute, wheel, pip
Browse files Browse the repository at this point in the history
By default `pip freeze` skip the mentioned packages and only displays
their version if `--all` is used
  • Loading branch information
Feandil committed Jul 26, 2018
1 parent 5626f9c commit 733740d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions manifests/pip.pp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
if $ensure != present and $ensure != latest {
exec { "pip_install_${name}":
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} ;}",
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex}",
user => $owner,
group => $group,
umask => $umask,
Expand All @@ -227,7 +227,7 @@
} else {
exec { "pip_install_${name}":
command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args} || ${pip_install} ${install_args} ${pip_common_args} ;}",
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex}",
user => $owner,
group => $group,
umask => $umask,
Expand All @@ -244,7 +244,7 @@
# Explicit version.
exec { "pip_install_${name}":
command => "${wheel_check} ; { ${pip_install} ${install_args} \$wheel_support_flag ${pip_common_args}==${ensure} || ${pip_install} ${install_args} ${pip_common_args}==${ensure} ;}",
unless => "${pip_env} freeze | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
user => $owner,
group => $group,
umask => $umask,
Expand All @@ -259,7 +259,7 @@
# Whatever version is available.
exec { "pip_install_${name}":
command => "${wheel_check} ; { ${pip_install} \$wheel_support_flag ${pip_common_args} || ${pip_install} ${pip_common_args} ;}",
unless => "${pip_env} freeze | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
unless => "${pip_env} freeze --all | grep -i -e ${grep_regex} || ${pip_env} list | sed -e 's/[ ]\\+/==/' -e 's/[()]//g' | grep -i -e ${grep_regex}",
user => $owner,
group => $group,
umask => $umask,
Expand Down Expand Up @@ -289,7 +289,7 @@
# Anti-action, uninstall.
exec { "pip_uninstall_${name}":
command => "echo y | ${pip_env} uninstall ${uninstall_args} ${proxy_flag} ${name}",
onlyif => "${pip_env} freeze | grep -i -e ${grep_regex}",
onlyif => "${pip_env} freeze --all | grep -i -e ${grep_regex}",
user => $owner,
group => $group,
umask => $umask,
Expand Down

0 comments on commit 733740d

Please sign in to comment.