From 0c4a8f35a8b79c268970a4f3a309311dead9f86f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 19 Oct 2010 20:29:19 +0200 Subject: [PATCH] TwistedCore: add distutilscross and distribute support Signed-off-by: Stephan Raue --- packages/python/web/TwistedCore/build | 14 ++++++++------ packages/python/web/TwistedCore/install | 4 +--- packages/python/web/TwistedCore/meta | 4 ++-- .../patches/TwistedCore-setuptools.diff | 12 ++++++++++++ 4 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 packages/python/web/TwistedCore/patches/TwistedCore-setuptools.diff diff --git a/packages/python/web/TwistedCore/build b/packages/python/web/TwistedCore/build index d32ecd9874..5c0da8b1ac 100755 --- a/packages/python/web/TwistedCore/build +++ b/packages/python/web/TwistedCore/build @@ -1,17 +1,19 @@ #!/bin/sh . config/options $1 -. config/options.python + +export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" +export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib" cd $PKG_BUILD -$PYTHON setup.py build +python setup.py build --cross-compile +python setup.py install -O1 --skip-build --prefix /usr --root .install -$PYTHON setup.py install -O1 --skip-build --root $SYSROOT_PREFIX --prefix /usr -$PYTHON setup.py install -O1 --skip-build --root ./.install --prefix /usr - -rm -rf .install/usr/bin +# install to toolchain because its needed for other twisted modules + python setup.py install -O1 --skip-build --prefix $ROOT/$TOOLCHAIN find .install -name "*.py" -exec rm -rf "{}" ";" find .install -name "*.pyo" -exec rm -rf "{}" ";" +rm -rf .install/usr/bin diff --git a/packages/python/web/TwistedCore/install b/packages/python/web/TwistedCore/install index 48109597bd..20287535f2 100755 --- a/packages/python/web/TwistedCore/install +++ b/packages/python/web/TwistedCore/install @@ -4,9 +4,7 @@ BUILD_DIR=`ls -d $PKG_BUILD` -. config/options.python - cp -PR $BUILD_DIR/.install/* $INSTALL mkdir -p $INSTALL/usr/bin - cp $BUILD_DIR/bin/twistd $INSTALL/usr/bin \ No newline at end of file + cp $BUILD_DIR/bin/twistd $INSTALL/usr/bin diff --git a/packages/python/web/TwistedCore/meta b/packages/python/web/TwistedCore/meta index de6329d3b8..28d692d1da 100644 --- a/packages/python/web/TwistedCore/meta +++ b/packages/python/web/TwistedCore/meta @@ -5,8 +5,8 @@ PKG_ARCH="any" PKG_LICENSE="MIT" PKG_SITE="http://twistedmatrix.com/" PKG_URL="http://tmrc.mit.edu/mirror/twisted/Core/10.1/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="Python" -PKG_BUILD_DEPENDS="toolchain Python" +PKG_DEPENDS="Python distribute" +PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross" PKG_PRIORITY="optional" PKG_SECTION="python/web" PKG_SHORTDESC="TwistedCore: An event-based networking framework for Internet applications" diff --git a/packages/python/web/TwistedCore/patches/TwistedCore-setuptools.diff b/packages/python/web/TwistedCore/patches/TwistedCore-setuptools.diff new file mode 100644 index 0000000000..e5b89f06c6 --- /dev/null +++ b/packages/python/web/TwistedCore/patches/TwistedCore-setuptools.diff @@ -0,0 +1,12 @@ +diff -Naur TwistedCore-10.1.0/twisted/python/dist.py TwistedCore-10.1.0.patch/twisted/python/dist.py +--- TwistedCore-10.1.0/twisted/python/dist.py 2009-04-14 14:03:09.000000000 +0200 ++++ TwistedCore-10.1.0.patch/twisted/python/dist.py 2010-10-19 00:46:32.896878949 +0200 +@@ -10,7 +10,7 @@ + from distutils.command import build_scripts, install_data, build_ext, build_py + from distutils.errors import CompileError + from distutils import core +-from distutils.core import Extension ++from setuptools import Extension + + twisted_subprojects = ["conch", "lore", "mail", "names", + "news", "pair", "runner", "web", "web2",