61 lines
2.1 KiB
Diff
61 lines
2.1 KiB
Diff
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -299,25 +299,25 @@
|
|
lambda x: "third_party/boringssl" not in x, CORE_C_FILES
|
|
)
|
|
CORE_C_FILES = filter(lambda x: "src/boringssl" not in x, CORE_C_FILES)
|
|
- SSL_INCLUDE = (os.path.join("/usr", "include", "openssl"),)
|
|
+ SSL_INCLUDE = (os.path.join(sys.prefix, "include", "openssl"),)
|
|
|
|
if BUILD_WITH_SYSTEM_ZLIB:
|
|
CORE_C_FILES = filter(lambda x: "third_party/zlib" not in x, CORE_C_FILES)
|
|
- ZLIB_INCLUDE = (os.path.join("/usr", "include"),)
|
|
+ ZLIB_INCLUDE = (os.path.join(sys.prefix, "include"),)
|
|
|
|
if BUILD_WITH_SYSTEM_CARES:
|
|
CORE_C_FILES = filter(lambda x: "third_party/cares" not in x, CORE_C_FILES)
|
|
- CARES_INCLUDE = (os.path.join("/usr", "include"),)
|
|
+ CARES_INCLUDE = (os.path.join(sys.prefix, "include"),)
|
|
|
|
if BUILD_WITH_SYSTEM_RE2:
|
|
CORE_C_FILES = filter(lambda x: "third_party/re2" not in x, CORE_C_FILES)
|
|
- RE2_INCLUDE = (os.path.join("/usr", "include", "re2"),)
|
|
+ RE2_INCLUDE = (os.path.join(sys.prefix, "include", "re2"),)
|
|
|
|
if BUILD_WITH_SYSTEM_ABSL:
|
|
CORE_C_FILES = filter(
|
|
lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES
|
|
)
|
|
- ABSL_INCLUDE = (os.path.join("/usr", "include"),)
|
|
+ ABSL_INCLUDE = (os.path.join(sys.prefix, "include"),)
|
|
|
|
EXTENSION_INCLUDE_DIRECTORIES = (
|
|
(PYTHON_STEM,)
|
|
@@ -344,6 +344,7 @@
|
|
EXTENSION_LIBRARIES += (
|
|
"advapi32",
|
|
"bcrypt",
|
|
+ "crypt32",
|
|
"dbghelp",
|
|
"ws2_32",
|
|
)
|
|
@@ -360,8 +361,8 @@
|
|
EXTENSION_LIBRARIES += ("re2",)
|
|
if BUILD_WITH_SYSTEM_ABSL:
|
|
EXTENSION_LIBRARIES += tuple(
|
|
- lib.stem[3:]
|
|
- for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so"))
|
|
+ lib.stem[3:-4]
|
|
+ for lib in sorted(pathlib.Path(sys.prefix).glob("lib*/libabsl_*.dll.a"))
|
|
)
|
|
|
|
DEFINE_MACROS = (("_WIN32_WINNT", 0x600),)
|
|
@@ -418,7 +419,6 @@
|
|
# ares_library_init compilation issue
|
|
DEFINE_MACROS += (
|
|
("WIN32_LEAN_AND_MEAN", 1),
|
|
- ("CARES_STATICLIB", 1),
|
|
("GRPC_ARES", 0),
|
|
("NTDDI_VERSION", 0x06000000),
|
|
("NOMINMAX", 1),
|