@@ -48,50 +48,53 @@ duckdb_add_library(duckdb_target)
4848
4949# Bundle in INTERFACE library
5050add_library (_duckdb_dependencies INTERFACE )
51- target_link_libraries (_duckdb_dependencies INTERFACE
52- pybind11::pybind11
53- duckdb_target
54- )
51+ target_link_libraries (_duckdb_dependencies INTERFACE pybind11::pybind11
52+ duckdb_target)
5553# Also add include directory
56- target_include_directories (_duckdb_dependencies INTERFACE
57- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /src/duckdb_py/include >
54+ target_include_directories (
55+ _duckdb_dependencies
56+ INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /src/duckdb_py/include >
5857)
5958
6059# ────────────────────────────────────────────
6160# Descend into the real DuckDB‑Python sources
6261# ────────────────────────────────────────────
6362add_subdirectory (src/duckdb_py)
6463
65- pybind11_add_module(_duckdb
66- $<TARGET_OBJECTS:python_src>
67- $<TARGET_OBJECTS:python_arrow >
68- $<TARGET_OBJECTS:python_common >
69- $<TARGET_OBJECTS:python_functional >
70- $<TARGET_OBJECTS:python_jupyter >
71- $<TARGET_OBJECTS:python_native >
72- $<TARGET_OBJECTS:python_numpy >
73- $<TARGET_OBJECTS:python_pandas >
74- $<TARGET_OBJECTS:python_pybind11 >
75- $<TARGET_OBJECTS:python_connection >
76- $<TARGET_OBJECTS:python_expression >
77- $<TARGET_OBJECTS:python_relation >
78- $<TARGET_OBJECTS:python_type >
79- )
64+ pybind11_add_module(
65+ _duckdb
66+ $<TARGET_OBJECTS:python_src >
67+ $<TARGET_OBJECTS:python_arrow >
68+ $<TARGET_OBJECTS:python_common >
69+ $<TARGET_OBJECTS:python_functional >
70+ $<TARGET_OBJECTS:python_jupyter >
71+ $<TARGET_OBJECTS:python_native >
72+ $<TARGET_OBJECTS:python_numpy >
73+ $<TARGET_OBJECTS:python_pandas >
74+ $<TARGET_OBJECTS:python_pybind11 >
75+ $<TARGET_OBJECTS:python_connection >
76+ $<TARGET_OBJECTS:python_expression >
77+ $<TARGET_OBJECTS:python_relation >
78+ $<TARGET_OBJECTS:python_type> )
8079# add _duckdb_dependencies
8180target_link_libraries (_duckdb PRIVATE _duckdb_dependencies)
8281
8382# ────────────────────────────────────────────
8483# Put the object file in the correct place
8584# ────────────────────────────────────────────
8685
87- # If we're not building through scikit-build-core then we have to set a different dest dir
86+ # If we're not building through scikit-build-core then we have to set a
87+ # different dest dir
8888include (GNUInstallDirs)
8989if (DEFINED SKBUILD_PLATLIB_DIR)
9090 set (_DUCKDB_PY_INSTALL_DIR "${SKBUILD_PLATLIB_DIR} " )
9191elseif (DEFINED Python_SITEARCH)
9292 set (_DUCKDB_PY_INSTALL_DIR "${Python_SITEARCH} " )
9393else ()
94- message (WARNING "Could not determine Python install dir. Falling back to CMAKE_INSTALL_LIBDIR." )
94+ message (
95+ WARNING
96+ "Could not determine Python install dir. Falling back to CMAKE_INSTALL_LIBDIR."
97+ )
9598 set (_DUCKDB_PY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR} " )
9699endif ()
97100
0 commit comments