|
| 1 | +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py |
| 2 | +index 97973bc..053c231 100644 |
| 3 | +--- a/Lib/ctypes/util.py |
| 4 | ++++ b/Lib/ctypes/util.py |
| 5 | +@@ -67,6 +67,13 @@ if os.name == "nt": |
| 6 | + return fname |
| 7 | + return None |
| 8 | + |
| 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 | +diff --git a/configure b/configure |
| 20 | +index 0914e24..dd00812 100755 |
| 21 | +--- a/configure |
| 22 | ++++ b/configure |
| 23 | +@@ -18673,4 +18673,3 @@ if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then |
| 24 | + echo "" >&6 |
| 25 | + echo "" >&6 |
| 26 | + fi |
| 27 | +- |
| 28 | +diff --git a/setup.py b/setup.py |
| 29 | +index 20d7f35..af15cc2 100644 |
| 30 | +--- a/setup.py |
| 31 | ++++ b/setup.py |
| 32 | +@@ -1501,7 +1501,9 @@ class PyBuildExt(build_ext): |
| 33 | + if zlib_inc is not None: |
| 34 | + zlib_h = zlib_inc[0] + '/zlib.h' |
| 35 | + version = '"0.0.0"' |
| 36 | +- version_req = '"1.1.3"' |
| 37 | ++ # version_req = '"1.1.3"' |
| 38 | ++ version_req = '"{}"'.format( |
| 39 | ++ os.environ.get('ZLIB_VERSION', '1.1.3')) |
| 40 | + if MACOS and is_macosx_sdk_path(zlib_h): |
| 41 | + zlib_h = os.path.join(macosx_sdk_root(), zlib_h[1:]) |
| 42 | + with open(zlib_h) as fp: |
0 commit comments