In the WSGI script file, add:

  import sys

  print >> sys.stderr, str(sys.path)

This will cause value of sys.path to be logged to Apache error log. Go
through what is dumped out to just make sure that .pth files contents
added correctly and that all the other directories added look
reasonable and refer to your virtual environment.

Graham

On Aug 26, 9:38 am, Olaf Meeuwissen <[EMAIL PROTECTED]> wrote:
> Sorry, meant to get back to this earlier but work got in the way.
>
> osimons <[EMAIL PROTECTED]> writes:
> > On Aug 21, 5:02 am, Olaf Meeuwissen <[EMAIL PROTECTED]> wrote:
>
> >> Is there an easy way to install the Subversion SWIG bindings in a
> >> virtualenv, or two?
>
> > Install the Subversion bindings against your correct main Python as
> > usual,
>
> That would be `apt-get install python-subversion` in my case.  Note
> that this package installs the *.py files and the native .so libs in
> different places.
>
>   *.py in /usr/share/python-support/python-subversion/{svn,libsvn}
>   *.so in /usr/lib/python-support/python-subversion/python2.[45]/libsvn
>
> The libsvn_swig_py2.[45] .so's are in /usr/lib/.
>
> > and in each virtualenv sitepackages derived from this Python
> > add a .pth file that points to location of svn libraries.
>
> > Like,
>
> > $ echo "/opt/local/lib/svn-python2.4" > /path/to/my/virutalenv/lib/
> > python2.4/site-packages/svn-python.pth
>
> Did that.
>
>   $ cat /path/to/virtualenv/lib/python2.5/site-packages/svn-python.pth
>   /usr/lib/python-support/python-subversion/python2.5
>   /usr/lib/python-support/python-subversion
>   /usr/share/python-support/python-subversion
>
> Restarted apache2 and fired up a new browser for good measure.
>
> > (My /opt/local/lib/svn-python2.4 contains the directories 'svn' and
> > 'libsvn')
>
> Unfortunately, that didn't work.
> Here's (what I think is) the relevant piece of the log:
>
>   2008-08-26 08:25:48,471 Trac[svn_fs] INFO: Failed to load Subversion 
> bindings
>   Traceback (most recent call last):
>     File 
> "/path/to/virtualenv/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac 
> /versioncontrol/svn_fs.py", line 253, in __init__
>       _import_svn()
>     File 
> "/path/to/virtualenv/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac 
> /versioncontrol/svn_fs.py", line 69, in _import_svn
>       from svn import fs, repos, core, delta
>     File "/usr/share/python-support/python-subversion/svn/fs.py", line 19, in 
> <module>
>       from libsvn.fs import *
>     File "/usr/share/python-support/python-subversion/libsvn/fs.py", line 7, 
> in <module>
>       import _fs
>   ImportError: No module named _fs
>
> FWIW, I'm using virtualenv-1.1 and using a virtualenv with site
> packages (that is, created without the --no-site-packages option) as
> my WSGIPythonHome works fine.
>
> Any ideas?
> --
> Olaf Meeuwissen                   FLOSS Engineer -- AVASYS Corporation
> FSF Associate Member #1962           sign up athttp://member.fsf.org/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to