Skip to content

Commit

Permalink
Make sure libcudf exports its pyarrow dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Dec 5, 2023
1 parent d26798a commit 15e7166
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cpp/cmake/thirdparty/get_arrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,29 @@ function(find_libarrow_in_python_wheel PYARROW_VERSION)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
list(APPEND CMAKE_PREFIX_PATH "${CUDF_PYARROW_WHEEL_DIR}")

string(
APPEND
initial_code_block
[=[
find_package(Python 3.9 REQUIRED COMPONENTS Interpreter)
execute_process(
COMMAND "${Python_EXECUTABLE}" -c "import pyarrow; print(pyarrow.get_library_dirs()[0])"
OUTPUT_VARIABLE CUDF_PYARROW_WHEEL_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY
)
list(APPEND CMAKE_PREFIX_PATH "${CUDF_PYARROW_WHEEL_DIR}")
]=]
)
rapids_find_generate_module(
Arrow NO_CONFIG
VERSION "${PYARROW_VERSION}"
LIBRARY_NAMES "${PYARROW_LIB}"
BUILD_EXPORT_SET cudf-exports
INSTALL_EXPORT_SET cudf-exports
HEADER_NAMES arrow/python/arrow_to_pandas.h
INITIAL_CODE_BLOCK initial_code_block
)

find_package(Arrow ${PYARROW_VERSION} MODULE REQUIRED GLOBAL)
Expand Down

0 comments on commit 15e7166

Please sign in to comment.