compiling standard python modules

Gerhard Häring g.haering at
Thu Aug 2 16:18:41 CEST 2001

Janno Kusman wrote:

> Hi!
> I'm trying to compile python to embed platform running NetBSD on MIPS 
> based CPU. I have managed to compile python executable and it seems to 
> work.
> I can't figure out how to compile standard modules like time and math. 
> Compiling is done under Windows using Cygwin based tools so I can't use 
> compiled python to run I tryied to run using windows 
> python, but it figures out platform and compilers wrong.
> I would preciate if someone could guide me how to compile standard 
> modules manually - how python finds and uses modules, maybe it's 
> possible to compile modules into python executable?

Yup. Compiling them statically into the python executable is IMO the way 
to go. Look into the Setup file in the Modules directory, activate all 
the modules you want (also look for *static* and *shared* in this file, 
I don't have a Python source tree here atm), then recompile Python.

Gerhard Häring
skynamics AG
g.haering at

More information about the Python-list mailing list