Python embedding & question about autoconf and dynamic linking

Mads Bondo Dydensborg madsdyd at challenge.dk
Mon Oct 1 14:01:40 EDT 2001


On 1 Oct 2001, Titus Brown wrote:

> >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."

Well, Gerhard Häring pointed out the distutils.sysconfig.get_config_vars
function for me, which appears to solve most problems, at least for
version 1.5.2 and forward. (Have not checked older versions).

Together with the stuff I found in KDE_CHECK_PYTHON and the stuff from
pygtk, I _think_ I may be able to hack together some autoconf stuff to
resolve this for any version of Python, that is never than or 1.5.2 (Which
is the version with RedHat 7.0 for what it is worth - not that I care so
much about distributions, but that should mean that it is quite
widespread. 

I will probably post it to this list (for people to ignore ;-) when I am
done. Wheter or not I actually make it, depends a little on wheter or not
I am actually going to use Python for my project.

> >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.

Great - that means that I can optionally do this (since it seems that
Python defaults to -fPIC on most platforms).

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd at challenge.dk
NT is a closed box of point tools linked by an untouchable matrix of
invisible semaphores. These bonds are surrounded by a blizzard of
mystifying, contradictory, and forever-changing OS documentation. 
Under an NT regime, almost all Unix users will lose the ability to 
exert low-level control over data and applications.







More information about the Python-list mailing list