Python

From CBLFS
Revision as of 11:14, 16 September 2006 by Jciccone (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Download Source: http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tar.bz2
Required Patch: http://svn.cross-lfs.org/svn/repos/patches/Python/Python-2.4.3-gdbm-1.patch
Required Patch (For Multilib): http://svn.cross-lfs.org/svn/repos/patches/Python/Python-2.4.3-multilib-2.patch

Dependencies

Optional

Non-Multilib

Compile the package:

patch -Np1 -i ../Python-2.4.3-gdbm-1.patch &&
./configure --prefix=/usr --enable-shared &&
make

Install the package

make install

Multilib

32Bit

Compile the package:

patch -Np1 -i ../Python-2.4.3-gdbm-1.patch &&
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
    --enable-shared &&
make

Install the package

make install &&
mv -v /usr/bin/python{,-32} &&
mv -v /usr/bin/python2.4{,-32}

N32

Change the libdir that Python is going to use to lib32:

patch -Np1 -i ../Python-2.4.3-multilib-2.patch
sed -i -e "s:@@MULTILIB_DIR@@:lib32:g" \
        Lib/distutils/command/install.py \
        Lib/distutils/sysconfig.py \
        Lib/site.py \
        Makefile.pre.in \
        Modules/Setup.dist \
        Modules/getpath.c \
        setup.py

Compile the package:

patch -Np1 -i ../Python-2.4.3-gdbm-1.patch &&
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure --prefix=/usr \
    --libdir=/usr/lib32 --enable-shared &&
make

Install the package

make install &&
mv -v /usr/bin/python{,-n32} &&
mv -v /usr/bin/python2.4{,-n32}

64Bit

Change the libdir that Python is going to use to lib64:

patch -Np1 -i ../Python-2.4.3-multilib-2.patch
sed -i -e "s:@@MULTILIB_DIR@@:lib64:g" \
        Lib/distutils/command/install.py \
        Lib/distutils/sysconfig.py \
        Lib/site.py \
        Makefile.pre.in \
        Modules/Setup.dist \
        Modules/getpath.c \
        setup.py

Compile the package:

patch -Np1 -i ../Python-2.4.3-gdbm-1.patch &&
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix=/usr \
    --libdir=/usr/lib64 --enable-shared &&
make

Install the package

make install &&
mv -v /usr/bin/python{,-64} &&
mv -v /usr/bin/python2.4{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/python &&
ln -sfv multiarch_wrapper /usr/bin/python2.4