From 5dc0ad329d364d2dc13aae4f3aa592bb032a3216 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 11 Jan 2010 10:51:55 +0100 Subject: [PATCH] Python: - build host python with prefix $SYSROOT_PREFIX/usr - build host python statically - dont install an full Python to $TOOLCHAIN - simplyfing - some cleanups --- config/options.python | 17 +++-------------- packages/lang/Python/build | 14 ++++++++------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/config/options.python b/config/options.python index 621d90f2a4..7c51acbddc 100644 --- a/config/options.python +++ b/config/options.python @@ -1,20 +1,9 @@ PYTHON_DIR="`ls -d $ROOT/$BUILD/Python*`" -PYTHON_LIBDIR="`ls -d $ROOT/$TOOLCHAIN/lib/python*`" -#PYTHON_INCDIR="`ls -d $SYSROOT_PREFIX/usr/include/python*`" - -export PYTHON="$ROOT/$TOOLCHAIN/bin/python" -#export PATH="$PYTHON_DIR":$PATH -#export CFLAGS="$CFLAGS -I$PYTHON_INCDIR -I$SYSROOT_PREFIX/usr/include" -export LDSHARED="$CC -shared" -#export PYTHONHOME=$ROOT/$TOOLCHAIN -#export PYTHON_INCLUDES="`ls -d $ROOT/$TOOLCHAIN/include/python*`" - +PYTHON_LIBDIR="`ls -d $SYSROOT_PREFIX/usr/lib/python*`" PYTHON_TOOLCHAIN_PATH=`ls -d $SYSROOT_PREFIX/usr/lib/python*/site-packages` PYTHON_IMAGE_PATH=`ls -d $INSTALL/usr/lib/python*/site-packages` +export PYTHON="$ROOT/$TOOLCHAIN/bin/python" +export LDSHARED="$CC -shared" export ac_cv_path_PYTHON=$PYTHON -#export am_cv_python_pythondir=$PYTHON_TOOLCHAIN_PATH -#export am_cv_python_pyexecdir=$PYTHON_TOOLCHAIN_PATH - - export PYTHONPATH="$PYTHON_TOOLCHAIN_PATH:$PYTHON_IMAGE_PATH" diff --git a/packages/lang/Python/build b/packages/lang/Python/build index bd3b4df29f..9f473be0eb 100755 --- a/packages/lang/Python/build +++ b/packages/lang/Python/build @@ -20,22 +20,24 @@ rm -rf config.cache CONFIG_SITE= \ OPT="$HOST_CFLAGS" \ -./configure --prefix=$ROOT/$TOOLCHAIN \ +./configure --prefix=$SYSROOT_PREFIX/usr \ + --disable-shared \ --without-cxx-main \ --with-threads \ - --enable-unicode=ucs4 \ OPT="$HOST_CFLAGS" \ make python Parser/pgen -OPT="$HOST_CFLAGS" \ -PYTHON_MODULES_INCLUDE=/usr/include \ -PYTHON_MODULES_LIB="/lib /lib64 /usr/lib /usr/lib64" \ -make HOSTPYTHON=./python sharedmods install +#OPT="$HOST_CFLAGS" \ +#PYTHON_MODULES_INCLUDE=/usr/include \ +#PYTHON_MODULES_LIB="/lib /lib64 /usr/lib /usr/lib64" \ +#make HOSTPYTHON=./python sharedmods install mv Parser/pgen ./hostpgen cp python ./hostpython +cp python $ROOT/$TOOLCHAIN/bin + make distclean setup_toolchain target