Skip to content

Commit 9ef21fd

Browse files
committed
Append _arrow_lib_dir to RPATH so _flight.so (python) can find libarrow_flight.so
1 parent 8918219 commit 9ef21fd

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

python/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ message(STATUS "Found Cython version: ${CYTHON_VERSION}")
293293
include(GNUInstallDirs)
294294
find_package(Arrow REQUIRED)
295295

296+
# When not bundling Arrow C++ libraries on macOS, add the Arrow library
297+
# directory to the RPATH so that the extensions can find libarrow at runtime.
298+
if(APPLE
299+
AND NOT PYARROW_BUNDLE_ARROW_CPP
300+
AND ARROW_SHARED_LIB)
301+
get_filename_component(_arrow_lib_dir "${ARROW_SHARED_LIB}" DIRECTORY)
302+
list(APPEND CMAKE_INSTALL_RPATH "${_arrow_lib_dir}")
303+
endif()
304+
296305
macro(define_option name description arrow_option)
297306
set("PYARROW_${name}"
298307
"AUTO"

0 commit comments

Comments
 (0)