Skip to content

Commit

Permalink
init.pp
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
mkonietzny committed Sep 8, 2016
1 parent e9c133e commit d3f315f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
}

$exec_prefix = $provider ? {
'scl' => "scl enable ${version} -- ",
'rhscl' => "scl enable ${version} -- ",
'scl' => "/usr/bin/scl enable ${version} -- ",
'rhscl' => "/usr/bin/scl enable ${version} -- ",
default => '',
}

Expand Down
20 changes: 11 additions & 9 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
name => $python,
}

package { 'virtualenv':
package { "virtualenv":
ensure => $venv_ensure,
require => Package['python'],
}
Expand Down Expand Up @@ -140,22 +140,24 @@
provider => 'rpm',
tag => 'python-scl-repo',
}
Package <| title == 'python' |> {
}

Package <| title == 'python' |> {
tag => 'python-scl-package',
}

Package <| title == 'virtualenv' |> {
name => "${python}-python-virtualenv",
}

package { "${python}-scldevel":
ensure => $dev_ensure,
tag => 'python-scl-package',
}

if $pip_ensure != 'absent' {
exec { 'python-scl-pip-install':
command => "${python::exec_prefix}easy_install pip",
path => ['/usr/bin', '/bin'],
creates => "/opt/rh/${python::version}/root/usr/bin/pip",
}
package { "${python}-python-pip":
ensure => $pip_ensure,
tag => 'python-pip-package',
}

if $::python::rhscl_use_public_repository {
Expand All @@ -164,7 +166,7 @@
}

Package <| tag == 'python-scl-package' |> ->
Exec['python-scl-pip-install']
Package <| tag == 'python-pip-package' |>
}
default: {

Expand Down
2 changes: 1 addition & 1 deletion manifests/virtualenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
$python = $version ? {
'system' => 'python',
'pypy' => 'pypy',
default => "python${version}",
default => "${version}",
}

if $virtualenv == undef {
Expand Down

0 comments on commit d3f315f

Please sign in to comment.