static compiled python modules

T

Thomas Linden

Hi,

I made a static version of my python modules (2.4), all modules were
build statically. The modules were linked into libpython2.4.a which
has ~ 8 MB then. The build process then links the python binary against
the libpython2.4.a, the resulting binary has ~ 5 MB afterwards (?).

The problem is, that python ignores several modules, it tries to load
the dynamic versions. E.g. if I do 'import math', it tells that it
cannot find a module 'math'. Of course there is no mathmodule.so
somewhere, because it is statically build-in. When I use 'nm' to take
a look at the python binary, I can find all functions exported by
the math module, so it is there, but python ignores it.

In contrast, for example the posix module works. Its also compiled in,
and doesn't exist as posixmodule.so.

How can I tell python to use the compiled in modules and not try to
load them from outside?



kind regards, Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top