File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
pythonforandroid/recipes/python2 Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ class Python2Recipe(GuestPythonRecipe):
3131 'patches/fix-filesystem-default-encoding.patch' ,
3232 'patches/fix-gethostbyaddr.patch' ,
3333 'patches/fix-posix-declarations.patch' ,
34- 'patches/fix-pwd-gecos.patch' ]
34+ 'patches/fix-pwd-gecos.patch' ,
35+ 'patches/fix-ctypes-util-find-library.patch' ]
3536
3637 configure_args = ('--host={android_host}' ,
3738 '--build={android_build}' ,
Original file line number Diff line number Diff line change 1+ diff -u a/Lib/ctypes/util.py b/Lib/ctypes/util.py
2+ --- a/Lib/ctypes/util.py 2019-06-20 18:52:01.372205226 +0200
3+ +++ b/Lib/ctypes/util.py 2019-06-20 18:51:39.612970779 +0200
4+ @@ -70,7 +70,14 @@
5+ def find_library(name):
6+ return name
7+
8+ - if os.name == "posix" and sys.platform == "darwin":
9+ + # This patch overrides the find_library to look in the right places on
10+ + # Android
11+ + if True:
12+ + from android._ctypes_library_finder import find_library as _find_lib
13+ + def find_library(name):
14+ + return _find_lib(name)
15+ +
16+ + elif os.name == "posix" and sys.platform == "darwin":
17+ from ctypes.macholib.dyld import dyld_find as _dyld_find
18+ def find_library(name):
19+ possible = ['lib%s.dylib' % name,
You can’t perform that action at this time.
0 commit comments