Graham Dumpleton
graham.dumpleton at gmail.com
Mon Mar 3 04:12:55 EST 2008
On 03/03/2008, rahul <Rahul.G.Nair at sun.com> wrote: > [Graham Dumpleton:] > > | > | > while developing modules in mod_python. Includes configuration > | > | > directives and APIs) > | > | > | > | If you want some semblance of version compatibility, or even > | > | portability for Python web applications, then don't write your web > | > | applications to directly use mod_python. Instead, write your web > | > | application to work against the WSGI specification (www.wsgi.org) for > | > | Python web applications. That way you have a better chance of changes > | > | in the hosting mechanism not causing a problem. > | > | > | > | What is you are really trying to do and what web applications are you > | > | wanting to host? Do you specifically need mod_python because of > | > | wanting to hook into internal features of Apache? > | > > | > > | > My interest is to bundle mod_python in OpenSolaris SXDE, as a package > | > (compiled) for others to use. So the applications that would use > | > mod_python would not be under my control. And yes, it could be that > | > the developers might decide to hook into the internals of apache through > | > mod_python (I cant be sure they wont :) ). > | > > | > Thank you for the response, It clarified what I was looking for. > | > | Since for Python web application development, most stuff is heading > | towards WSGI, you might also want to have a look at mod_wsgi > | (www.modwsgi.org). > > > ok, I will try and bundle that too. > > > | BTW, does Solaris packaged version of Python supply only a static > | version of Python library? Lack of a shared library for Python, > | installed in correct place so that it is found properly, has been a > | problem with many Python distributions. I recollect some distributed > | versions of Python for Solaris being like that. > > > We do bundle the libpython shared library in solaris. > > $file /usr/lib/sparcv9/libpython2.4.so.1.0 > /usr/lib/sparcv9/libpython2.4.so.1.0: ELF 64-bit MSB dynamic lib > SPARCV9 Version 1, dynamically linked > > $file /usr/lib/libpython2.4.so.1.0 > /usr/lib/libpython2.4.so.1.0: ELF 32-bit MSB dynamic lib > SPARCV9 Version 1, dynamically linked > > $cat /etc/release > Solaris Express Community Edition snv_83a SPARC Is there also a symlink for the libpython2.4.so in the lib/python2.4/config directory along side the libpython2.4.a file. This is the problem. If the symlink isn't in that location also, when -L for config directory is used it will only find the static library and so mod_python and mod_wsgi end up being really fat because of static library being embedded in them. This causes large memory footprints at runtime because of static library ended up private rather than being shared. It is actually a fault of Python installation scripts that symlink isn't put there. Luckily these days, nearly all the Linux distributions know they need to put a symlink for the .so in the config directory as well so embedded systems can use it properly. Some still don't, thus why I thought to check what Solaris does. Graham > | For more details on static/shared library issues, see: > | > | http://code.google.com/p/modwsgi/wiki/InstallationIssues > > > Thanks that is very useful. > > > Rahul > >
|