Skip to content

Commit 7b60faf

Browse files
committed
Merge pull request kivy#309 from alanjds/recipe-eventlet
Recipe for eventlet lib
2 parents 73db656 + ba9cdf9 commit 7b60faf

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/setup.py b/setup.py
2+
index 7a601d5..56491a0 100644
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -1,8 +1,17 @@
6+
#!/usr/bin/env python
7+
-from setuptools import find_packages, setup
8+
+from distutils.core import setup
9+
from eventlet import __version__
10+
from os import path
11+
12+
+import re, os
13+
+def find_packages(path='.', exclude=[]):
14+
+ ret = []
15+
+ for root, dirs, files in os.walk(path):
16+
+ if '__init__.py' in files:
17+
+ ret.append(re.sub('^[^A-z0-9_]+', '', root.replace('/', '.')))
18+
+ ret = [i for i in ret if i not in exclude]
19+
+ return ret
20+
+
21+
22+
setup(
23+
name='eventlet',
24+

recipes/eventlet/recipe.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
VERSION_eventlet=${VERSION_eventlet:-0.15.2}
4+
URL_eventlet=https://pypi.python.org/packages/source/e/eventlet/eventlet-$VERSION_eventlet.tar.gz
5+
DEPS_eventlet=(libevent greenlet)
6+
MD5_eventlet=c5b0217cc1da6fcf4bcf6957df57f3cd
7+
BUILD_eventlet=$BUILD_PATH/eventlet/$(get_directory $URL_eventlet)
8+
RECIPE_eventlet=$RECIPES_PATH/eventlet
9+
10+
function prebuild_eventlet() {
11+
cd $BUILD_eventlet
12+
13+
# check marker in our source build
14+
if [ -f .patched ]; then
15+
# no patch needed
16+
return
17+
fi
18+
19+
try patch -p1 < $RECIPE_eventlet/patches/fix-setuptools.patch
20+
21+
# everything done, touch the marker !
22+
touch .patched
23+
}
24+
25+
function shouldbuild_eventlet() {
26+
if [ -d "$SITEPACKAGES_PATH/eventlet" ]; then
27+
DO_BUILD=0
28+
fi
29+
}
30+
31+
function build_eventlet() {
32+
cd $BUILD_eventlet
33+
34+
push_arm
35+
export CFLAGS="$CFLAGS -I$BUILD_libevent/build/include"
36+
export LDFLAGS="$LDFLAGS -L$LIBS_PATH -L$BUILD_libevent/build/lib/"
37+
38+
try $HOSTPYTHON setup.py install -O2
39+
pop_arm
40+
}
41+
42+
function postbuild_eventlet() {
43+
true
44+
}

0 commit comments

Comments
 (0)