Google Groups

Re: Twisted and Zope Recipes


Mathieu Virbel Jan 30, 2012 9:58 AM
Posted in group: Python For Android
Hi,

I'm going to merge both of them, thanks you for the contribution :)
(next time, try to do a pull request, then you'll get the awards for the
commit ^^)

Mathieu

On 28/01/2012 17:50, deakblue wrote:
> Hi,
>
> Below are recipes for Twisted and twisted's dependency, Zope.
>
> So the Zope recipe is screwed-up but I accidentally got it to work while
> commenting and re-commenting lines in the "try ..." part of the
> build_zope() function. This makes me think those steps might run somehow
> in a different sequence. I really have no clue how this build system
> works, so I'm just copy/pasting and praying.
>
> Anyway, with Twisted/Zope in my dist, I can now build and deploy socket
> event apps (in my case, websocket apps via Autobahn).
>
> I'm very very interested to see recipes for these two packages
> mainlined, as they're required for twisted framework support in Kivy and
> talking to Android apps via the Interwebs is cool.
>
> Bet regards,
> -db-
>
>
>
>
>     #!/bin/bash
>     VERSION_twisted=
>     #URL_kivy=https://github.com/kivy/kivy/zipball/android-support/kivy-android-support.zip
>     URL_twisted=http://twistedmatrix.com/Releases/Twisted/11.1/Twisted-11.1.0.tar.bz2
>     DEPS_twisted=(zope)
>     MD5_twisted=
>     BUILD_twisted=$BUILD_PATH/twisted/$(get_directory $URL_twisted)
>     RECIPE_twisted=$RECIPES_PATH/twisted
>     function prebuild_twisted() {
>     true
>     }
>     function build_twisted() {
>     if [ -d
>     "$BUILD_PATH/python-install/lib/python2.7/site-packages/twisted" ]; then
>     return
>     true
>     fi
>     cd $BUILD_twisted
>     push_arm
>     export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
>     export LDSHARED="$LIBLINK"
>     # 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 rm -rf
>     $BUILD_PATH/python-install/lib/python*/site-packages/twisted/tools
>     unset LDSHARED
>     pop_arm
>     }
>     function postbuild_twisted() {
>     true
>     }
>
>
>
>
>
>     VERSION_zope=
>     #URL_kivy=https://github.com/kivy/kivy/zipball/android-support/kivy-android-support.zip
>     URL_zope=http://pypi.python.org/packages/source/z/zope.interface/zope.interface-3.8.0.tar.gz
>     DEPS_zope=
>     MD5_zope=8ab837320b4532774c9c89f030d2a389
>     BUILD_zope=$BUILD_PATH/zope/$(get_directory $URL_zope)
>     RECIPE_zope=$RECIPES_PATH/zope
>     function prebuild_zope() {
>     true
>     }
>     function build_zope() {
>     if [ -d
>     "$BUILD_PATH/python-install/lib/python2.7/site-packages/zope" ]; then
>     return
>     true
>     fi
>     cd $BUILD_zope
>     push_arm
>     export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
>     export LDSHARED="$LIBLINK"
>     # 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 rm -rf
>     $BUILD_PATH/python-install/lib/python*/site-packages/zope/tools
>     unset LDSHARED
>     pop_arm
>     }
>     function postbuild_zope() {
>     true
>     }
>
>
>