diff --git a/manifests/install.pp b/manifests/install.pp index c2fc8902..c716c024 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -61,6 +61,7 @@ package { 'pip': ensure => $pip_ensure, require => Package['python'], + name => "${python}-pip", } package { 'python-dev': @@ -203,7 +204,7 @@ } } - if $::python::version =~ /^3/ { + if $::python::version =~ /^python3/ { $pip_package = 'python3-pip' } else { $pip_package = 'python-pip' diff --git a/manifests/pip.pp b/manifests/pip.pp index 6dd01017..c510910e 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -115,8 +115,13 @@ default => $virtualenv, } + $pip_binary = $python_version ? { + 'python3' => 'pip3', + default => 'pip', + } + $pip_env = $virtualenv ? { - 'system' => "${exec_prefix}pip", + 'system' => "${exec_prefix}${pip_binary}", default => "${exec_prefix}${virtualenv}/bin/pip", }