Skip to content

Commit 649957d

Browse files
committed
Fix virtualenv package installation on Debian Jessie.
On Debian Jessie the package `python-virtualenv` no longer installes the `virtualenv` binary. Instead we must install the `virtualenv` package. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752467 Fixes voxpupuli#194
1 parent e92de3d commit 649957d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

manifests/install.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
'Suse' => "${python}-devel",
2828
}
2929

30+
$python_virtualenv = $::lsbdistcodename ? {
31+
'jessie' => 'virtualenv',
32+
default => 'python-virtualenv',
33+
}
34+
3035
# pip version: use only for installation via os package manager!
3136
if $::python::version =~ /^3/ {
3237
$pip = 'python3-pip'
@@ -67,11 +72,11 @@
6772
if ($venv_ensure == present) and ($::operatingsystemrelease =~ /^6/) {
6873
if $python::use_epel == true {
6974
include 'epel'
70-
Class['epel'] -> Package['python-virtualenv']
75+
Class['epel'] -> Package[$python_virtualenv]
7176
}
7277
}
7378
}
74-
package { 'python-virtualenv': ensure => $venv_ensure }
79+
package { $python_virtualenv: ensure => $venv_ensure }
7580
package { $pip: ensure => $pip_ensure }
7681
package { $pythondev: ensure => $dev_ensure }
7782
package { $python: ensure => present }

0 commit comments

Comments
 (0)