[Distutils] python port for openwrt

nic niclane at oakcom.co.nz
Thu Dec 8 21:11:13 CET 2005

Hi Tim,

I'm trying to get a cut down version of the python interpreter running under
openwrt. I saw you message on the python mailing list from 2004 and was
if you could let me know more about how you compiled it.

Could you send me the make file you used or some cut and pastes of the commands
you ran. I'm new to cross compilation and a bit green.

I'm also trying to get the size down of the interpreter. I only need to run a
few scripts which don't need that many modules, in the scripts they just import
serial, sys, time, string, cStringIO, and struct. Did you ever just make a
interpreter that included a sub set of the modules?

I've been following the basic idea of compiling then renaming two exe python and
pgen and so you have the two exes that will run on the native machine which is
the tricky part from what people say.

I've tried following the description that you link to in your post:


but when I try and do the step of the following:

 # CXX=$mips_linux_path\g++ \
CC=$mips_linux_path\gcc \
AR=$mips_linux_path\ar \
RANLIB=$mips_linux_path\ranlib \
./configure mips_linux --target=mips_linux --prefix=/usr

I get errors from the ./configure step saying it that g++ can not create
executables. I guess it's trying to build an executable on my desktop with the
cross compiler g++ and then seeing that it doesn't work on the desktop and then
complaining, how did you get around this?

Any help would be really appreciated.

Thanks a bunch,


More information about the Distutils-SIG mailing list