Python embedding & question about autoconf and dynamic linking

Titus Brown t at chabry.caltech.edu
Mon Oct 1 11:13:42 EDT 2001


In article <mailman.1001924521.17257.python-list at python.org>,
Mads Bondo Dydensborg  <madsdyd at challenge.dk> wrote:
>> >So, my first question is if there are any autoconf macros out there that
>> >will work for me, sort of like a AM_PATH_SDL macro?
>> > [munch]
>> 
>> I haven't found one in distutils, either, which seems like a natural
>> place for them.
>> 
>> Please let me know if you get a list sent to you privately; I'm very
>> interested in this for 'configure'ing PyWX...
>
>No luck so far. (I am quoting most of my original post in case someone in
>knowledge will notice).
>
>I will continue to hack on the KDE_CHECK_PYTHON script - what are you
>using for PyWX?

*blush* Nothing.  "Hey, does it compile?  Great!  Oops.  Missing symbols?
Post to the list."

>> >My next question is with respect to dynamicly linking to the python
>> >interprenter, when embedding it.
>> > [munch]
>> 
>> For older versions, you should be able to do something like this:
>> 
>> make CFLAGS=-fpic
>> mkdir .shared
>> cd .shared
>> ar xv ../libpython.a
>> gcc -shared -o ../libpython.so *.o
>
>Hmm. So, I should actually be able to create a .so on an endusers machine,
>_if_ the original python installation was built with -fpic. Otherwise I
>have to recompile the python installation.

right.

>Not a nice thing. Are there any particular reason that python does not
>"come as a so" on Linux and Solaris? (Or other .so enabled platforms).

Err, the FAQ entry had something to say about that, too.  But it's gone now.
I think the answer was that most people didn't need it.

--titus



More information about the Python-list mailing list