Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualenv 20x: fix site-packages param #589

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions manifests/virtualenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,11 @@
}
}

# Virtualenv versions prior to 1.7 do not support the
# --system-site-packages flag, default off for prior versions
# Prior to version 1.7 the default was equal to --system-site-packages
# and the flag --no-site-packages had to be passed to do the opposite
$_virtualenv_version = getvar('virtualenv_version') ? {
/.*/ => getvar('virtualenv_version'),
$system_pkgs_flag = $systempkgs ? {
true => '--system-site-packages',
default => '',
}

if versioncmp($_virtualenv_version,'1.7') > 0 and $systempkgs == true {
$system_pkgs_flag = '--system-site-packages'
} elsif versioncmp($_virtualenv_version,'1.7') < 0 and $systempkgs == false {
$system_pkgs_flag = '--no-site-packages'
} else {
$system_pkgs_flag = $systempkgs ? {
true => '--system-site-packages',
default => '--no-site-packages',
}
}

$distribute_pkg = $distribute ? {
true => 'distribute',
default => 'setuptools',
Expand Down