Redhat .so python shared library.
bondpaper at earthlink.net
Sun Oct 20 11:30:58 CEST 2002
In article <3daffc2e$1 at news.mt.net.mk>,
´ÐÜøÐÝ ³. <ßÕÝÓãØÝØáâÐ@ÜÐØÛ.ÝÕâ.ÜÚ> wrote:
> >> I didn't know that this is possible.
> >> Is it? [ Compiling python as a shared library, I mean. ]
> > What do you mean, not possible? On any system that supports shared
> > libraries, you can replace any static library with a shared library,
> > if you adjust the build process.
> I think when I tried that some years ago, it didn't work. Programs
> would not work when linked with shared python. But this was long time
I feel silly admitting this, but a method is explained in the Python FAQ
for converting the standard .a file into a shared library. It's not all
that complicated, and doesn't require fiddling with the makefile. I
discovered this after I posted my question, and it works quite nicely.
make OPT="-fpic -O2"
(cd .extract; ar xv ../libpython1.5.a)
gcc -shared -o libpython1.5.so .extract/*.o
rm -rf .extract
It also says that a shared library will be a supported option in v2.3.
More information about the Python-list