From 3ad810899bb06f8d2ea70b7c572704158c853ac7 Mon Sep 17 00:00:00 2001 From: Florian Zierer Date: Tue, 10 May 2016 10:20:33 +0200 Subject: [PATCH] gevent and greenlet recipes --- pythonforandroid/recipes/gevent/__init__.py | 10 +++++++++ pythonforandroid/recipes/gevent/gevent.patch | 21 +++++++++++++++++++ pythonforandroid/recipes/greenlet/__init__.py | 9 ++++++++ 3 files changed, 40 insertions(+) create mode 100644 pythonforandroid/recipes/gevent/__init__.py create mode 100644 pythonforandroid/recipes/gevent/gevent.patch create mode 100644 pythonforandroid/recipes/greenlet/__init__.py diff --git a/pythonforandroid/recipes/gevent/__init__.py b/pythonforandroid/recipes/gevent/__init__.py new file mode 100644 index 0000000000..c3a9957a37 --- /dev/null +++ b/pythonforandroid/recipes/gevent/__init__.py @@ -0,0 +1,10 @@ +from pythonforandroid.toolchain import CompiledComponentsPythonRecipe + + +class GeventRecipe(CompiledComponentsPythonRecipe): + version = '1.1.1' + url = 'https://pypi.python.org/packages/source/g/gevent/gevent-{version}.tar.gz' + depends = [('python2', 'python3crystax'), 'greenlet'] + patches = ["gevent.patch"] + +recipe = GeventRecipe() diff --git a/pythonforandroid/recipes/gevent/gevent.patch b/pythonforandroid/recipes/gevent/gevent.patch new file mode 100644 index 0000000000..4b4b673fc9 --- /dev/null +++ b/pythonforandroid/recipes/gevent/gevent.patch @@ -0,0 +1,21 @@ +diff -Naur gevent-1.1.1/setup.py gevent-1.1.1_diff/setup.py +--- gevent-1.1.1/setup.py 2016-04-04 17:27:33.000000000 +0200 ++++ gevent-1.1.1_diff/setup.py 2016-05-10 10:10:39.145881610 +0200 +@@ -96,7 +96,7 @@ + # and the PyPy branch will clean it up. + libev_configure_command = ' '.join([ + "(cd ", _quoted_abspath('libev/'), +- " && /bin/sh ./configure ", ++ " && /bin/sh ./configure --host={}".format(os.environ['TOOLCHAIN_PREFIX']), + " && cp config.h \"$OLDPWD\"", + ")", + '> configure-output.txt' +@@ -112,7 +112,7 @@ + # Use -r, not -e, for support of old solaris. See https://github.com/gevent/gevent/issues/777 + ares_configure_command = ' '.join(["(cd ", _quoted_abspath('c-ares/'), + " && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi ", +- " && /bin/sh ./configure " + _m32 + "CONFIG_COMMANDS= CONFIG_FILES= ", ++ " && /bin/sh ./configure --host={} ".format(os.environ['TOOLCHAIN_PREFIX']) + "CFLAGS= LDFLAGS= CONFIG_COMMANDS= CONFIG_FILES= ", + " && cp ares_config.h ares_build.h \"$OLDPWD\" ", + " && mv ares_build.h.orig ares_build.h)", + "> configure-output.txt"]) diff --git a/pythonforandroid/recipes/greenlet/__init__.py b/pythonforandroid/recipes/greenlet/__init__.py new file mode 100644 index 0000000000..a12758142f --- /dev/null +++ b/pythonforandroid/recipes/greenlet/__init__.py @@ -0,0 +1,9 @@ +from pythonforandroid.toolchain import PythonRecipe + + +class GreenletRecipe(PythonRecipe): + version = '0.4.9' + url = 'https://pypi.python.org/packages/source/g/greenlet/greenlet-{version}.tar.gz' + depends = [('python2', 'python3crystax')] + +recipe = GreenletRecipe()