summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarl Stefansson <jarl@sdelements.com>2014-01-03 11:45:39 -0500
committerJarl Stefansson <jarl@sdelements.com>2014-01-03 11:45:39 -0500
commit223da1caddb69418fc1a6383dbb5ea65c9fcdf90 (patch)
treea110a1f7c35a433d7a23312fe07795d54d6b1b1c
parentce3562f32bdf37d78228c22038a6b9d13f073c54 (diff)
Fix wheel/pip1.5 handing with requirements
-rw-r--r--manifests/virtualenv.pp12
1 files changed, 6 insertions, 6 deletions
diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp
index a779141..fc540a8 100644
--- a/manifests/virtualenv.pp
+++ b/manifests/virtualenv.pp
@@ -127,17 +127,17 @@ define python::virtualenv (
# version, this makes sure we only use wheels if they are supported
exec { "python_virtualenv_${venv_dir}":
- command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip wheel --help > /dev/null 2>&1 && { ${venv_dir}/bin/pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg}",
- user => $owner,
- path => $path,
- cwd => "/tmp",
+ command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip wheel --help > /dev/null 2>&1 && { ${venv_dir}/bin/pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg}",
+ user => $owner,
+ path => $path,
+ cwd => "/tmp",
environment => $environment,
- unless => "grep '^[\\t ]*VIRTUAL_ENV=[\\\\'\\\"]*${venv_dir}[\\\"\\\\'][\\t ]*$' ${venv_dir}/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv
+ unless => "grep '^[\\t ]*VIRTUAL_ENV=[\\\\'\\\"]*${venv_dir}[\\\"\\\\'][\\t ]*$' ${venv_dir}/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv
}
if $requirements {
exec { "python_requirements_initial_install_${requirements}_${venv_dir}":
- command => "${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} ${wheel_support_flag} -r ${requirements}",
+ command => "${venv_dir}/bin/pip wheel --help > /dev/null 2>&1 && { ${venv_dir}/bin/pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag -r ${requirements}",
refreshonly => true,
timeout => $timeout,
user => $owner,