From a85dddfe999dba1af39c37cdd7bad327d511a259 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 2 Oct 2024 10:41:10 +0200 Subject: [PATCH] MINOR: [Python][CI] Avoid unconditional use of precompiled headers The precompiled headers generated during the PyArrow build phase seem to take a lot of disk space (more than 2 GB). Avoiding their unconditional generation should make disk space issues on CI less likely. --- python/CMakeLists.txt | 2 +- python/pyarrow/src/arrow/python/udf.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 912719b20f0e4..710735adc704d 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -454,7 +454,7 @@ endif() add_library(arrow_python SHARED ${PYARROW_CPP_SRCS}) target_include_directories(arrow_python PUBLIC ${PYARROW_CPP_ROOT_DIR} ${CMAKE_CURRENT_BINARY_DIR}/pyarrow/src) -if(NOT CMAKE_VERSION VERSION_LESS 3.16) +if(ARROW_USE_PRECOMPILED_HEADERS) target_precompile_headers(arrow_python PUBLIC "$<$:arrow/python/pch.h>") endif() diff --git a/python/pyarrow/src/arrow/python/udf.cc b/python/pyarrow/src/arrow/python/udf.cc index 74f16899c47eb..f9c3b11cc75c5 100644 --- a/python/pyarrow/src/arrow/python/udf.cc +++ b/python/pyarrow/src/arrow/python/udf.cc @@ -16,6 +16,8 @@ // under the License. #include "arrow/python/udf.h" + +#include "arrow/array/array_nested.h" #include "arrow/array/builder_base.h" #include "arrow/buffer_builder.h" #include "arrow/compute/api_aggregate.h"