summaryrefslogtreecommitdiff
path: root/manifests/virtualenv.pp
diff options
context:
space:
mode:
authorJarl Stefansson <jarl@sdelements.com>2014-01-02 15:25:27 -0500
committerJarl Stefansson <jarl@sdelements.com>2014-01-02 15:25:27 -0500
commit6d88eb88f3ec00655a25f9cb83efd58f293ef4fe (patch)
treed7687b94fa5105a7868fcb48e50ef935ddc36d99 /manifests/virtualenv.pp
parent5dfe3e57489790823928a90363d7ab81500ce5e8 (diff)
Fix wheel support and pip version compatability
Fix wheel support and compatability for older pip versions by detecting suppport when running the pip command inside a virtualenv.
Diffstat (limited to 'manifests/virtualenv.pp')
-rw-r--r--manifests/virtualenv.pp7
1 files changed, 4 insertions, 3 deletions
diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp
index 7b4b53c..7b39212 100644
--- a/manifests/virtualenv.pp
+++ b/manifests/virtualenv.pp
@@ -110,9 +110,10 @@ define python::virtualenv (
$system_pkgs_flag = ''
}
- # Python 2.6 and older don't support setuptools > 0.8 which is required
- # for pip wheel support, pip therefor requires --no-use-wheel flag
- if ( versioncmp($::python_version,'2.6') > 0 ) {
+ # Python 2.6 and older don't support setuptools/distribute > 0.8 which is required
+ # for pip wheel support, pip therefor requires --no-use-wheel flag if the
+ # version is newer than 1.4.1 when they added wheels
+ if (( versioncmp($::python_version,'2.6') > 0 and ( versioncmp($::pip_version,'1.4.1') > 0)) {
$wheel_support_flag = '--no-use-wheel'
} else {
$wheel_support_flag = ''