From 53cda12a64220fc4fc803d2733bf47e91221a1e1 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 14 Mar 2012 15:32:42 +0000 Subject: [PATCH 1/4] removed distutils from blacklist --- distribute.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/distribute.sh b/distribute.sh index 2b217609f1..0a9ea5a771 100755 --- a/distribute.sh +++ b/distribute.sh @@ -516,7 +516,6 @@ function run_distribute() { try rm -rf distutils/tests try rm -rf email/test try rm -rf bsddb/test - try rm -rf distutils try rm -rf config/libpython*.a try rm -rf config/python.o try rm -rf curses From 8ab6ebbac9a1abf93b49dbc230f70b8635629a45 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 14 Mar 2012 15:45:00 +0000 Subject: [PATCH 2/4] adjusting hostpython path for recipes that use setuptools where it is available --- recipes/twisted/recipe.sh | 5 ++++- recipes/zope/recipe.sh | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes/twisted/recipe.sh b/recipes/twisted/recipe.sh index e2e7b8a173..7e335482c1 100644 --- a/recipes/twisted/recipe.sh +++ b/recipes/twisted/recipe.sh @@ -23,12 +23,15 @@ function build_twisted() { export LDFLAGS="$LDFLAGS -L$LIBS_PATH" export LDSHARED="$LIBLINK" + export PYTHONPATH=$BUILD_PATH/hostpython/Python-2.7.2/Lib/site-packages + # fake try to be able to cythonize generated files $BUILD_PATH/python-install/bin/python.host setup.py build_ext try find . -iname '*.pyx' -exec cython {} \; try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v try find build/lib.* -name "*.o" -exec $STRIP {} \; - try $BUILD_PATH/python-install/bin/python.host setup.py install -O2 + + try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/twisted/test try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/twisted/*/test diff --git a/recipes/zope/recipe.sh b/recipes/zope/recipe.sh index 29286355a0..8539ba9b4d 100644 --- a/recipes/zope/recipe.sh +++ b/recipes/zope/recipe.sh @@ -13,7 +13,7 @@ function prebuild_zope() { function build_zope() { - if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/zope" ]; then + if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/zope/interface" ]; then return fi @@ -23,8 +23,10 @@ function build_zope() { export LDFLAGS="$LDFLAGS -L$LIBS_PATH" export LDSHARED="$LIBLINK" + export PYTHONPATH=$BUILD_PATH/hostpython/Python-2.7.2/Lib/site-packages + + try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages - try $BUILD_PATH/python-install/bin/python.host setup.py install -O2 try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/zope/interface/tests try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/zope/interface/*.txt From b71ca3a47d26a9c1df4164f7034b2740b5a7d565 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 14 Mar 2012 15:54:39 +0000 Subject: [PATCH 3/4] added setuptools recipe --- recipes/setuptools/recipe.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 recipes/setuptools/recipe.sh diff --git a/recipes/setuptools/recipe.sh b/recipes/setuptools/recipe.sh new file mode 100644 index 0000000000..80717ba849 --- /dev/null +++ b/recipes/setuptools/recipe.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +VERSION_setuptools=0.6c11 +URL_setuptools=http://pypi.python.org/packages/source/s/setuptools/setuptools-$VERSION_setuptools.tar.gz +DEPS_setuptools=(python) +MD5_setuptools=7df2a529a074f613b509fb44feefe74e +BUILD_setuptools=$BUILD_PATH/setuptools/$(get_directory $URL_setuptools) +RECIPE_setuptools=$RECIPES_PATH/setuptools + +function prebuild_setuptools() { + true +} + +function build_setuptools() { + + if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/setuptools" ]; then + return + fi + + cd $BUILD_setuptools + + push_arm + # build setuptools for android + try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages + + # build setuptools for python-for-android + try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/hostpython/Python-2.7.2 --install-lib=Lib/site-packages + pop_arm +} + +function postbuild_setuptools() { + true +} From c45725a5c4038fcef671e2575e541a08d4a44d0f Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 14 Mar 2012 16:52:53 +0000 Subject: [PATCH 4/4] fixing hostpython paths to use BUILD_hostpython --- recipes/setuptools/recipe.sh | 4 ++-- recipes/twisted/recipe.sh | 4 ++-- recipes/zope/recipe.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/setuptools/recipe.sh b/recipes/setuptools/recipe.sh index 80717ba849..ea60185edc 100644 --- a/recipes/setuptools/recipe.sh +++ b/recipes/setuptools/recipe.sh @@ -21,10 +21,10 @@ function build_setuptools() { push_arm # build setuptools for android - try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages + try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages # build setuptools for python-for-android - try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/hostpython/Python-2.7.2 --install-lib=Lib/site-packages + try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_hostpython --install-lib=Lib/site-packages pop_arm } diff --git a/recipes/twisted/recipe.sh b/recipes/twisted/recipe.sh index 7e335482c1..fb459f2c82 100644 --- a/recipes/twisted/recipe.sh +++ b/recipes/twisted/recipe.sh @@ -23,7 +23,7 @@ function build_twisted() { export LDFLAGS="$LDFLAGS -L$LIBS_PATH" export LDSHARED="$LIBLINK" - export PYTHONPATH=$BUILD_PATH/hostpython/Python-2.7.2/Lib/site-packages + export PYTHONPATH=$BUILD_hostpython/Lib/site-packages # fake try to be able to cythonize generated files $BUILD_PATH/python-install/bin/python.host setup.py build_ext @@ -31,7 +31,7 @@ function build_twisted() { try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v try find build/lib.* -name "*.o" -exec $STRIP {} \; - try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages + try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/twisted/test try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/twisted/*/test diff --git a/recipes/zope/recipe.sh b/recipes/zope/recipe.sh index 8539ba9b4d..4d4f114394 100644 --- a/recipes/zope/recipe.sh +++ b/recipes/zope/recipe.sh @@ -23,9 +23,9 @@ function build_zope() { export LDFLAGS="$LDFLAGS -L$LIBS_PATH" export LDSHARED="$LIBLINK" - export PYTHONPATH=$BUILD_PATH/hostpython/Python-2.7.2/Lib/site-packages + export PYTHONPATH=$BUILD_hostpython/Lib/site-packages - try $BUILD_PATH/hostpython/Python-2.7.2/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages + try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/zope/interface/tests try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/zope/interface/*.txt