@@ -22,6 +22,7 @@ function prebuild_python() {
22
22
try patch -p1 < $RECIPE_python /patches/disable-modules.patch
23
23
try patch -p1 < $RECIPE_python /patches/fix-locale.patch
24
24
try patch -p1 < $RECIPE_python /patches/fix-gethostbyaddr.patch
25
+ try patch -p1 < $RECIPE_python /patches/fix-setup-flags.patch
25
26
try patch -p1 < $RECIPE_python /patches/custom-loader.patch
26
27
try patch -p1 < $RECIPE_python /patches/verbose-compilation.patch
27
28
@@ -34,9 +35,8 @@ function build_python() {
34
35
cd $BUILD_python
35
36
36
37
# if the last step have been done, avoid all
37
- if [ -f $BUILD_PATH /python-install/bin/python.host ]; then
38
+ if [ -f libpython2.7.so ]; then
38
39
return
39
- # true
40
40
fi
41
41
42
42
# copy same module from host python
@@ -45,14 +45,18 @@ function build_python() {
45
45
try cp $BUILD_hostpython /hostpgen .
46
46
47
47
push_arm
48
+
49
+ # openssl activated ?
50
+ if [ " X$BUILD_openssl " != " X" ]; then
51
+ debug " Activate flags for openssl / python"
52
+ export CFLAGS=" $CFLAGS -I$BUILD_openssl /include/"
53
+ export LDFLAGS=" $LDFLAGS -L$BUILD_openssl /"
54
+ fi
55
+
48
56
try ./configure --host=arm-eabi --prefix=" $BUILD_PATH /python-install" --enable-shared
49
57
try $MAKE HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
50
58
cp HOSTPYTHON=$BUILD_python /hostpython python
51
59
52
- # Try to compile module by ourself
53
- # debug 'Try to compile module by ourself'
54
- # $BUILD_python/hostpython -E setup.py build -v -f
55
-
56
60
# FIXME, the first time, we got a error at:
57
61
# python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
58
62
# /home/tito/code/python-for-android/build/python/Python-2.7.2/python: 1: Syntax error: word unexpected (expecting ")")
0 commit comments