This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 441b2648e build(python/adbc_driver_manager): enable conda support
properly (#3484)
441b2648e is described below
commit 441b2648e516547375cc0207e44ebf682e0d6e5c
Author: David Li <[email protected]>
AuthorDate: Sat Sep 27 14:34:01 2025 +0900
build(python/adbc_driver_manager): enable conda support properly (#3484)
Closes #3483.
---
python/adbc_driver_manager/setup.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/python/adbc_driver_manager/setup.py
b/python/adbc_driver_manager/setup.py
index 3bf854f02..1256440a2 100644
--- a/python/adbc_driver_manager/setup.py
+++ b/python/adbc_driver_manager/setup.py
@@ -80,17 +80,23 @@ version = get_version("adbc_driver_manager")
# Resolve compiler flags
build_type = os.environ.get("ADBC_BUILD_TYPE", "release")
+# We need to replicate the check here because we don't build via CMake
+is_conda = os.environ.get("_ADBC_IS_CONDA") == "1" or
os.environ.get("CONDA_BUILD")
if sys.platform == "win32":
extra_compile_args = ["/std:c++17", "/DADBC_EXPORTING",
"/D_CRT_SECURE_NO_WARNINGS"]
if build_type == "debug":
extra_compile_args.extend(["/DEBUG:FULL"])
+ if is_conda:
+ extra_compile_args.append("/DADBC_CONDA_BUILD=1")
extra_link_args = ["shell32.lib", "uuid.lib", "advapi32.lib"]
else:
extra_compile_args = ["-std=c++17"]
if build_type == "debug":
# Useful to step through driver manager code in GDB
extra_compile_args.extend(["-ggdb", "-Og"])
+ if is_conda:
+ extra_compile_args.append("-DADBC_CONDA_BUILD=1")
extra_link_args = []
# ------------------------------------------------------------