[Python-Dev] Relocating Python

Lupusoru, Razvan A razvan.a.lupusoru at intel.com
Tue Jul 29 20:56:43 CEST 2008


Hello,

 

I am trying to get Python 2.5.2 working for an IA32 system. The
compilation is done on an Ubuntu 8.04.1 dev system. I am using a custom
gcc and ld specific to the IA32 system.

 

This is my makefile:

##############################

BUILD_DEST = /i686-custom-kernel

CC = $(BUILD_DEST)/bin/i686-linux-gcc

CPP = $(CC) -E

CXX = $(BUILD_DEST)/bin/i686-linux-g++

LD = $(BUILD_DEST)/bin/i686-linux-ld

PYTHONINSTALLPATH = $(BUILD_DEST)/usr

Export

 

all:

                tar xzfv Python-2.5.2.tgz

                ./Python-2.5.2/configure -prefix=${PYTHONINSTALLPATH}
-host=i686-linux -enable-shared

                cd Python-2.5.2

                make

                make install

##############################

 

Everything compiles correctly. I then copy the contents of the
$BUILD_DEST and put them on the hard drive for my IA32 system. I
basically use the contents of $BUILD_DEST as the root directory on my
IA32 system. Python seems to run correctly when I run it, but when I do
things like "import pysqlite", it cannot find it. Is there anything
special I have to do to relocate my python (since on my IA32 system it
runs from /usr/bin/python but it originally gets created in
${BUILD_DEST}/usr/bin/python)?

 

Thank you,

 

Razvan A. Lupusoru

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20080729/ad910a7e/attachment.htm>


More information about the Python-Dev mailing list