I am running modwsgi in embedded mode, and apache runs chrooted.
Python 2.7 is initializing its module search path differently when run
embedded than when it is run from true root.

The python module directories are all duplicated in the change-root
and true root; (actually they are in the change-root, and each
directory is soft-linked from the same path in the true root, but they
act as dual copies)

For diagnostic purposes, the wsgi script has the snippet:

import sys
print >> sys.stderr, 'sys.path =', sys.path
print >> sys.stderr, 'sys.prefix =', sys.prefix

This is what it prints in chrooted embedded python:
sys.path = ['/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/wsgi']
sys.prefix = /usr

and this is what it prints run from bash in the true root.

sys.path = ['/webroot/wsgi',
'/usr/lib/python2.6/dist-packages/WebOb-1.0.7-py2.6.egg',
'/usr/lib/python2.6/dist-packages/twiddler-0.9.1-py2.6.egg',
'/usr/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg',
'/usr/lib/python2.6/dist-packages/lxml-2.3-py2.6-linux-x86_64.egg',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/local/lib/python2.6/dist-packages', '/wsgi']
sys.prefix = /usr

Anyway, the abbreviated path I get chrooted does not allow Python to
find modules.  Any insight as to what I might do to get this working?

Thanks

-- 
[email protected]
Rdbhost -> SQL databases as a webservice [www.rdbhost.com]

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
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