summaryrefslogtreecommitdiff
path: root/manifests/virtualenv.pp
diff options
context:
space:
mode:
authorJarl Stefansson <jarl@sdelements.com>2013-11-01 18:20:01 -0400
committerJarl Stefansson <jarl@sdelements.com>2013-11-01 18:20:01 -0400
commit176915523acd5ddd88de187426966b0d9ffb5f4b (patch)
tree2a0302dea68a74536d8c9c37976a903288b1cd93 /manifests/virtualenv.pp
parenta017bd325e677159e37d22d5b2ef65377846b23e (diff)
Disable system package flag on older virtualenv
Diffstat (limited to 'manifests/virtualenv.pp')
-rw-r--r--manifests/virtualenv.pp11
1 files changed, 8 insertions, 3 deletions
diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp
index bdcfc6f..fc46c72 100644
--- a/manifests/virtualenv.pp
+++ b/manifests/virtualenv.pp
@@ -15,6 +15,8 @@
#
# [*systempkgs*]
# Copy system site-packages into virtualenv. Default: don't
+# If virtualenv version < 1.7 this flag has no effect since
+# the system packages were not supported
#
# [*distribute*]
# Include distribute in the virtualenv. Default: true
@@ -88,9 +90,12 @@ define python::virtualenv (
default => "&& export http_proxy=${proxy}",
}
- $system_pkgs_flag = $systempkgs ? {
- false => '',
- default => '--system-site-packages',
+ # Virtualenv versions prior to 1.7 do not support the
+ # --system-site-packages flag, default off for prior versions
+ if versioncmp($::virtualenv_version,'1.7') > 0 and systempkgs == true {
+ $system_pkgs_flag = '--system-site-packages',
+ } else {
+ $system_pkgs_flag = ''
}
$distribute_pkg = $distribute ? {