On Jan 10, 2017, at 10:14:42, Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
On Tue, Jan 10, 2017 at 3:52 PM, Tom Kacvinsky <tom.kacvinsky@suse.com> wrote:
I am not a mod_python user, but it seemed reasonable to me to see if there is a way of modifying the search path via a mod_python directive. There is, and this page should get you started:
I tried adding:
PythonPath "['/usr/lib/python2.7/site-packages', '/usr/lib64/python2.7/site-packages']"
So the Apache config is:
<Location /systems> SetHandler mod_python PythonInterpreter main_interpreter PythonPath "['/usr/lib/python2.7/site-packages', '/usr/lib64/python2.7/site-packages']" PythonHandler trac.web.modpython_frontend PythonOption TracEnv /vol1/trac/systems PythonOption TracUriRoot /systems AuthType Basic AuthName "Systems" AuthUserFile /vol1/trac/access/systems/.htpasswd Require valid-user </Location>
It still only looked in /usr/lib64/python2.7/site-packages. The directive seems to be accepted as it shows up for this Location in server-info. But I don't see mod_python using it.
The configuration had been working on a 32-bit install where all is in /usr/lib. I'm updating the server to 64-bit, and this issue has arisen.
I forgot a fundamental aspect of this. The 32 bit modules in /usr/lib/python2.7/site-packages will not load in the 64 bit environment, unless it is pure Python. But I suspect part of what you have in the 32 bit directory is a dynamically loaded 32 bit shared object, which just won't work in a 64 bit environment. A solution to this problem is to rebuild it as a 64 bit module. Not sure if you are grabbing this module from OBS or not. If you are, you'll need to contact the OBS maintainer for this module and get them to build in 64 bit mode. But if you are building from source, you're on your own. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org