1- diff --git a/setup.py b/setup.py
2- --- a/setup.py
3- +++ b/setup.py
4- @@ -58,12 +58,14 @@ CARES_INCLUDE = (
1+ --- a/setup.py 2026-03-31 12:55:12
2+ +++ b/setup.py 2026-03-31 12:56:03
3+ @@ -58,12 +58,14 @@
54 os.path.join("third_party", "cares"),
65 os.path.join("third_party", "cares", "cares"),
76 )
@@ -17,13 +16,34 @@ diff --git a/setup.py b/setup.py
1716 if "openbsd" in sys.platform:
1817 CARES_INCLUDE += (os.path.join("third_party", "cares", "config_openbsd"),)
1918 RE2_INCLUDE = (os.path.join("third_party", "re2"),)
20- @@ -304,7 +306,9 @@ if BUILD_WITH_SYSTEM_OPENSSL:
19+ @@ -302,7 +304,9 @@
20+ lambda x: "third_party/boringssl" not in x, CORE_C_FILES
2121 )
2222 CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES)
2323- SSL_INCLUDE = (os.path.join("/usr", "include", "openssl"),)
2424+ # Use cross-compiled OpenSSL headers when OPENSSL_ROOT_DIR is set
2525+ _ssl_prefix = os.environ.get("OPENSSL_ROOT_DIR", "/usr")
2626+ SSL_INCLUDE = (os.path.join(_ssl_prefix, "include"),)
27-
27+
2828 if BUILD_WITH_SYSTEM_ZLIB:
2929 CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES)
30+ @@ -329,14 +333,17 @@
31+ + ADDRESS_SORTING_INCLUDE
32+ + CARES_INCLUDE
33+ + RE2_INCLUDE
34+ - + SSL_INCLUDE
35+ + UPB_INCLUDE
36+ + UPB_GRPC_GENERATED_INCLUDE
37+ + UPBDEFS_GRPC_GENERATED_INCLUDE
38+ + UTF8_RANGE_INCLUDE
39+ + XXHASH_INCLUDE
40+ - + ZLIB_INCLUDE
41+ )
42+ +
43+ + # On Android, SSL_INCLUDE uses OPENSSL_ROOT_DIR; skip ZLIB_INCLUDE to avoid /usr/include
44+ + EXTENSION_INCLUDE_DIRECTORIES += SSL_INCLUDE
45+ + if "android" not in sys.platform:
46+ + EXTENSION_INCLUDE_DIRECTORIES += ZLIB_INCLUDE
47+
48+ EXTENSION_LIBRARIES = ()
49+ if "linux" in sys.platform:
0 commit comments