Skip to content

Commit 7057d4a

Browse files
committed
bugfix install pip on centos6 using scl
1 parent 8de9098 commit 7057d4a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

manifests/install.pp

+12-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$python = $::python::version ? {
1919
'system' => 'python',
2020
'pypy' => 'pypy',
21-
default => "python${python::version}",
21+
default => "${python::version}",
2222
}
2323

2424
$pythondev = $::osfamily ? {
@@ -50,11 +50,6 @@
5050
name => $python,
5151
}
5252

53-
package { 'pip':
54-
ensure => $pip_ensure,
55-
require => Package['python'],
56-
}
57-
5853
package { 'virtualenv':
5954
ensure => $venv_ensure,
6055
require => Package['python'],
@@ -63,6 +58,11 @@
6358
case $python::provider {
6459
pip: {
6560

61+
package { 'pip':
62+
ensure => $pip_ensure,
63+
require => Package['python'],
64+
}
65+
6666
package { 'python-dev':
6767
ensure => $dev_ensure,
6868
name => $pythondev,
@@ -123,7 +123,7 @@
123123
}
124124
if $pip_ensure != 'absent' {
125125
exec { 'python-scl-pip-install':
126-
command => "${python::params::exec_prefix}easy_install pip",
126+
command => "${python::exec_prefix}easy_install pip",
127127
path => ['/usr/bin', '/bin'],
128128
creates => "/opt/rh/${python::version}/root/usr/bin/pip",
129129
require => Package['scl-utils'],
@@ -163,6 +163,11 @@
163163

164164
default: {
165165

166+
package { 'pip':
167+
ensure => $pip_ensure,
168+
require => Package['python'],
169+
}
170+
166171
package { 'python-dev':
167172
ensure => $dev_ensure,
168173
name => $pythondev,

0 commit comments

Comments
 (0)