File tree 1 file changed +11
-5
lines changed 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,15 @@ function build_python() {
96
96
97
97
# CFLAGS for python ctypes library
98
98
# export CFLAGS="$CFLAGS -DNO_MALLINFO"
99
- machine=` uname -m`
100
- export BUILDARCH=${machine} -linux-gnu
99
+ machine=$( uname -m)
100
+ system=$( uname -s)
101
+ system=${system,,} # convert to lowercase
102
+
103
+ if [ " $machine " == " i386" ]; then
104
+ machine=x86
105
+ fi
106
+
107
+ export BUILDARCH=${machine} -${system} -gnu
101
108
export HOSTARCH=arm-eabi
102
109
103
110
try ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix=" $BUILD_PATH /python-install" --enable-shared --disable-toolbox-glue --disable-framework
@@ -118,14 +125,13 @@ function build_python() {
118
125
$MAKE install HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
119
126
pop_arm
120
127
121
- system=$( uname -s)
122
- if [ " X$system " == " XDarwin" ]; then
128
+ if [ " X$system " == " Xdarwin" ]; then
123
129
try cp $RECIPE_python /patches/_scproxy.py $BUILD_python /Lib/
124
130
try cp $RECIPE_python /patches/_scproxy.py $BUILD_PATH /python-install/lib/python2.7/
125
131
fi
126
132
try cp $BUILD_hostpython /hostpython $HOSTPYTHON
127
133
try cp libpython2.7.so $LIBS_PATH /
128
- try cp -a build/lib.linux -${machine} -2.7/_ctypes* .so $LIBS_PATH
134
+ try cp -a build/lib.${system} -${machine} -2.7/_ctypes* .so $LIBS_PATH
129
135
130
136
# reduce python
131
137
rm -rf " $BUILD_PATH /python-install/lib/python2.7/test"
You can’t perform that action at this time.
0 commit comments