[Python-Dev] _PyImport_LoadDynamicModule questions

Martin v. Loewis martin@v.loewis.de
31 May 2002 00:41:25 +0200


Guido van Rossum <guido@python.org> writes:

> What problems (apart from the pain of getting this to build right on
> many platforms)? 

Building it is not the issue; running it is the
problem. /usr/local/lib is searched for shared libraries only on
Linux, on all other systems, you either have to add a -R option, or
require users to set LD_LIBRARY_PATH. The latter is clear undesirable,
so you have to hard-code the path to libpython into the executable. In
turn, the resulting binary is not relocatable anymore.

> You mentioned a bit of a slowdown due to PIF code
> (probably not even measurable in pystone) and a slower startup due to
> a few stat calls.  Note that all extensions are already shared
> libraries -- so the problems can't be too bad.

You also get a slow-down from the -R option (if you needed to use it
in the first place). This will cause all library searches without a
path to look into an additional directory.

Regards,
Martin