Building C modules static to the interpreter?

Gerhard Häring gh_pythonlist at
Sat Dec 22 10:33:38 EST 2001

Le 22/12/01 à 00:24, Dave Cinege écrivit:
> Before I try to think too hard on my own (dangerous) is there an
> easy way to build a static python interpreter that includes some
> of the C modules?

You need to edit Modules/Setup, then recompile your Python.

If you also want to statically link against glibc, you'll probably need
to insert "--static" somewhere in the top-level Makefile.

mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

More information about the Python-list mailing list