Skip to content

Commit

Permalink
Fix virtualenv, rebuild if not correct env
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarl Stefansson committed Dec 12, 2013
1 parent 69d2a14 commit f7801a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/virtualenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

2 comments on commit f7801a4

@dcarley
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be ${venv_dir}/bin/activate instead of /tmp/bin/activate?

@antevens
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is supposed to point to the virtualenv. I was using /tmp for testing and seems I forgot to change the path, unfortunately I'm travelling with sporadic internet/computer access so I'm unable to test.

Please sign in to comment.