Skip to content

Commit d3f315f

Browse files
committed
init.pp
* fixed bug with puppet 3.8.7/--parser future by using a qualified path name for scl Error: Validation of Exec[python_requirements_initial_install_...] failed: 'scl enable rh-python34 -- ...' is not qualified and no path was specified. Please qualify the command or specify a path. at /tmp/vagrant-puppet/.../python/manifests/virtualenv.pp:173 install.pp * added virtualenv specific package for rhscl virtualenv.pp * fixed version not prepended with "python" - will fail for rhscl (version = "rh-python34" for example)
1 parent e9c133e commit d3f315f

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
}
9292

9393
$exec_prefix = $provider ? {
94-
'scl' => "scl enable ${version} -- ",
95-
'rhscl' => "scl enable ${version} -- ",
94+
'scl' => "/usr/bin/scl enable ${version} -- ",
95+
'rhscl' => "/usr/bin/scl enable ${version} -- ",
9696
default => '',
9797
}
9898

manifests/install.pp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
name => $python,
5151
}
5252

53-
package { 'virtualenv':
53+
package { "virtualenv":
5454
ensure => $venv_ensure,
5555
require => Package['python'],
5656
}
@@ -140,22 +140,24 @@
140140
provider => 'rpm',
141141
tag => 'python-scl-repo',
142142
}
143-
Package <| title == 'python' |> {
143+
}
144+
145+
Package <| title == 'python' |> {
144146
tag => 'python-scl-package',
145147
}
148+
149+
Package <| title == 'virtualenv' |> {
150+
name => "${python}-python-virtualenv",
146151
}
147152

148153
package { "${python}-scldevel":
149154
ensure => $dev_ensure,
150155
tag => 'python-scl-package',
151156
}
152157

153-
if $pip_ensure != 'absent' {
154-
exec { 'python-scl-pip-install':
155-
command => "${python::exec_prefix}easy_install pip",
156-
path => ['/usr/bin', '/bin'],
157-
creates => "/opt/rh/${python::version}/root/usr/bin/pip",
158-
}
158+
package { "${python}-python-pip":
159+
ensure => $pip_ensure,
160+
tag => 'python-pip-package',
159161
}
160162

161163
if $::python::rhscl_use_public_repository {
@@ -164,7 +166,7 @@
164166
}
165167

166168
Package <| tag == 'python-scl-package' |> ->
167-
Exec['python-scl-pip-install']
169+
Package <| tag == 'python-pip-package' |>
168170
}
169171
default: {
170172

manifests/virtualenv.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
$python = $version ? {
9494
'system' => 'python',
9595
'pypy' => 'pypy',
96-
default => "python${version}",
96+
default => "${version}",
9797
}
9898

9999
if $virtualenv == undef {

0 commit comments

Comments
 (0)