TwistedCore: add distutilscross and distribute support

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-10-19 20:29:19 +02:00
parent 44d3bbe17c
commit 0c4a8f35a8
4 changed files with 23 additions and 11 deletions

View File

@ -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

View File

@ -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
cp $BUILD_DIR/bin/twistd $INSTALL/usr/bin

View File

@ -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"

View File

@ -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",