From f7801a4b0d9ae58187891d124c21d269eae19ba5 Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 12 Dec 2013 14:00:03 -0500 Subject: [PATCH] Fix virtualenv, rebuild if not correct env --- manifests/virtualenv.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index 95fe1f7a..1a2b093c 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -114,10 +114,10 @@ exec { "python_virtualenv_${venv_dir}": command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip --log-file ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} --upgrade pip ${distribute_pkg}", user => $owner, - creates => "${venv_dir}/bin/activate", path => $path, cwd => "/tmp", environment => $environment, + unless => "grep '^[ \t]*VIRTUAL_ENV=[\'\"]*/tmp[\"\']*[ \t]*$' /tmp/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv } if $requirements {