Skip to content

Commit d31942f

Browse files
authored
Merge pull request #2469 from macdems/develop
Fix bad library found by ctypes for 64-bit arch (#2468)
2 parents a0cb7b4 + 90e296e commit d31942f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pythonforandroid/recipes/android/src/android/_ctypes_library_finder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
import sys
23
import os
34

45

@@ -44,7 +45,10 @@ def does_libname_match_filename(search_name, file_path):
4445

4546
def find_library(name):
4647
# Obtain all places for native libraries:
47-
lib_search_dirs = ["/system/lib"]
48+
if sys.maxsize > 2**32: # 64bit-build
49+
lib_search_dirs = ["/system/lib64", "/system/lib"]
50+
else:
51+
lib_search_dirs = ["/system/lib"]
4852
lib_dir_1 = get_activity_lib_dir("org.kivy.android.PythonActivity")
4953
if lib_dir_1 is not None:
5054
lib_search_dirs.insert(0, lib_dir_1)

0 commit comments

Comments
 (0)