Skip to content

Commit

Permalink
Added full pip install support for all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarl Stefansson committed Nov 8, 2013
1 parent 0f83afd commit 69d2a14
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
/(?i:Debian|Ubuntu)/ => "${python}-dev"
}

package { $python: ensure => present }

$dev_ensure = $python::dev ? {
true => present,
default => absent,
Expand All @@ -22,9 +20,6 @@
default => absent,
}

package { $pythondev: ensure => $dev_ensure }
package { 'python-pip': ensure => $pip_ensure }

$venv_ensure = $python::virtualenv ? {
true => present,
default => absent,
Expand All @@ -33,10 +28,16 @@
# Install latest from pip if pip is the provider
case $python::provider {
pip: {
package { 'virtualenv': ensure => latest, provider => pip }
package { 'virtualenv': ensure => latest, provider => pip }
package { 'pip': ensure => latest, provider => pip }
package { $pythondev: ensure => latest }
package { "python==${python::version}": ensure => latest, provider => pip }
}
default: {
package { 'python-virtualenv': ensure => $venv_ensure }
package { 'python-pip': ensure => $pip_ensure }
package { $pythondev: ensure => $dev_ensure }
package { $python: ensure => present }
}
}

Expand Down

0 comments on commit 69d2a14

Please sign in to comment.