Skip to content

Commit 7cbfaf5

Browse files
committed
add code to replace setuptools with ''distutils.core`
Before modification, there will be the following error: ``` Leaving ARM environment Call build_click Entering in ARM environment Compiler found at /home/human/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin//arm-linux-androideabi-gcc Traceback (most recent call last): File "setup.py", line 3, in <module> from setuptools import setup File "/home/human/.local/lib/python2.7/site-packages/setuptools/__init__.py", line 12, in <module> from setuptools.extension import Extension File "/home/human/.local/lib/python2.7/site-packages/setuptools/extension.py", line 8, in <module> from .dist import _get_unpatched File "/home/human/.local/lib/python2.7/site-packages/setuptools/dist.py", line 18, in <module> from setuptools import windows_support File "/home/human/.local/lib/python2.7/site-packages/setuptools/windows_support.py", line 2, in <module> import ctypes File "/home/human/Work/browser/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/ctypes/__init__.py", line 10, in <module> from _ctypes import Union, Structure, Array ImportError: /home/human/Work/browser/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/lib-dynload/_ctypes.so: wrong ELF class: ELFCLASS32 ``` the `setuptools` looks Could not to use, so I changed it to use `distutils.core`.
1 parent f8c89a1 commit 7cbfaf5

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

recipes/click/recipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function build_click() {
2121
cd $BUILD_click
2222

2323
push_arm
24+
sed -i "s/setuptools/distutils.core/g" `grep -rl "setuptools" ./setup.py`
2425
try $HOSTPYTHON setup.py install
2526
pop_arm
2627
}

recipes/flask/recipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function build_flask() {
2121
cd $BUILD_flask
2222

2323
push_arm
24+
sed -i "s/setuptools/distutils.core/g" `grep -rl "setuptools" ./setup.py`
2425
try $HOSTPYTHON setup.py install
2526
pop_arm
2627
}

recipes/jinja2/recipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function build_jinja2() {
2121
cd $BUILD_jinja2
2222

2323
push_arm
24+
sed -i "s/setuptools/distutils.core/g" `grep -rl "setuptools" ./setup.py`
2425
try $HOSTPYTHON setup.py install
2526
pop_arm
2627
}

recipes/markupsafe/recipe.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ function shouldbuild_markupsafe() {
2020
function build_markupsafe() {
2121
cd $BUILD_markupsafe
2222

23-
push_arm
23+
push_arm
24+
sed -i "s/setuptools/distutils.core/g" `grep -rl "setuptools" ./setup.py`
2425
try $HOSTPYTHON setup.py install
2526
pop_arm
2627
}

recipes/werkzeug/recipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function build_werkzeug() {
2121
cd $BUILD_werkzeug
2222

2323
push_arm
24+
sed -i "s/setuptools/distutils.core/g" `grep -rl "setuptools" ./setup.py`
2425
try $HOSTPYTHON setup.py install
2526
pop_arm
2627
}

0 commit comments

Comments
 (0)