From 7057d4ae88976a91748fc14c2bca3c4fb9a65e9d Mon Sep 17 00:00:00 2001 From: Ernesto Ruy Sanchez Date: Sat, 5 Dec 2015 16:06:42 -0800 Subject: [PATCH 1/2] bugfix install pip on centos6 using scl --- manifests/install.pp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 44782fd4..243e6a23 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -18,7 +18,7 @@ $python = $::python::version ? { 'system' => 'python', 'pypy' => 'pypy', - default => "python${python::version}", + default => "${python::version}", } $pythondev = $::osfamily ? { @@ -50,11 +50,6 @@ name => $python, } - package { 'pip': - ensure => $pip_ensure, - require => Package['python'], - } - package { 'virtualenv': ensure => $venv_ensure, require => Package['python'], @@ -63,6 +58,11 @@ case $python::provider { pip: { + package { 'pip': + ensure => $pip_ensure, + require => Package['python'], + } + package { 'python-dev': ensure => $dev_ensure, name => $pythondev, @@ -123,7 +123,7 @@ } if $pip_ensure != 'absent' { exec { 'python-scl-pip-install': - command => "${python::params::exec_prefix}easy_install pip", + command => "${python::exec_prefix}easy_install pip", path => ['/usr/bin', '/bin'], creates => "/opt/rh/${python::version}/root/usr/bin/pip", require => Package['scl-utils'], @@ -163,6 +163,11 @@ default: { + package { 'pip': + ensure => $pip_ensure, + require => Package['python'], + } + package { 'python-dev': ensure => $dev_ensure, name => $pythondev, From cffddeb9dd3028f6472d93a517b96e32018789d1 Mon Sep 17 00:00:00 2001 From: Ernesto Ruy Sanchez Date: Sun, 6 Dec 2015 18:39:37 -0800 Subject: [PATCH 2/2] bugfix: fixed syntax to pass linter --- manifests/install.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 243e6a23..b0b63d21 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -18,7 +18,7 @@ $python = $::python::version ? { 'system' => 'python', 'pypy' => 'pypy', - default => "${python::version}", + default => $python::version, } $pythondev = $::osfamily ? {