A followup on virtualenv 1.3.

Do not use the 'activate_this.py' script provided in virtualenv 1.3
with mod_wsgi. This is because the script changes sys.prefix.

This may cause problems in mod_wsgi as the intention is only to add
directories related to additional site-packages directory in virtual
environment, not change the whole of Python to point at the virtual
environment.

Thus, if not able to use WSGIPythonPath or python-path option,
continue to use site.addsitedir() for now as documented in:

  http://code.google.com/p/modwsgi/wiki/VirtualEnvironments

Graham

2008/9/26 Graham Dumpleton <[EMAIL PROTECTED]>:
> 2008/9/26 Graham Dumpleton <[EMAIL PROTECTED]>:
>> Looks like virtualenv 1.3 has just come out.
>>
>>  http://pypi.python.org/pypi/virtualenv
>>
>> I note though that documentation now no longer mentions using
>> site.addsitedir() to make use of virtual environment with mod_python
>> and mod_wsgi. Instead there is some new mechanism which requires doing
>> an execfile() on some file in the virtual environment.
>>
>> At the moment haven't looked at what this mechanism does and whether
>> there will be issues with using it all with mod_wsgi. I am presuming
>> that site.addsitedir() will work, but not sure. It is possible the
>> result will be different to this other approach in respect of ordering
>> of stuff in sys.path.
>>
>> End result may be that mod_wsgi may have to be modified to cater
>> specifically for how newer virtualenv does things. I had wanted to
>> avoid doing that as at the moment there is no specific dependence on
>> virtualenv, it will just work with any valid site-packages directory.
>
> FYI, the script in virtualenv is addressing an issue I did know of and
> one which was the reason for suggesting setting WSGIPythonHome to a
> virgin virtual environment not linked to main Python installation
> site-packages.
>
> I have created an issue:
>
>  http://code.google.com/p/modwsgi/issues/detail?id=112
>
> to integrate into mod_wsgi itself similar reordering mechanism as
> virtualenv 1.3 is applying.
>
> For more details, see the linked issue.
>
> If yo don't understand what the virtual environment stuff is about see:
>
>  http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
>
> Graham
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to modwsgi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to