From 41026d4cf244c9c55860b0895824b2f29cde0bf4 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Fri, 20 Mar 2026 11:08:31 +0100 Subject: [PATCH 01/12] Skip header files when installing compiled Cython files --- python/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 6395b3e1e7a0..388e9be4f543 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -968,6 +968,9 @@ foreach(module ${CYTHON_EXTENSIONS}) continue() endif() endif() + if(output MATCHES "\\.h$") + continue() + endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION ".") endforeach() endforeach() From efc1ae9d2ac95406d29fb42d8c7206f1f0942bc2 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Fri, 20 Mar 2026 12:08:58 +0100 Subject: [PATCH 02/12] Fix old build include location test --- python/pyarrow/tests/test_cpp_internals.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/pyarrow/tests/test_cpp_internals.py b/python/pyarrow/tests/test_cpp_internals.py index 7508d8f0b981..fbbf95e81b6c 100644 --- a/python/pyarrow/tests/test_cpp_internals.py +++ b/python/pyarrow/tests/test_cpp_internals.py @@ -49,9 +49,8 @@ def test_pyarrow_include(): # created. Either with PyArrow C++ header files or with # Arrow C++ and PyArrow C++ header files together - source = os.path.dirname(os.path.abspath(__file__)) - pyarrow_dir = pjoin(source, '..') - pyarrow_include = pjoin(pyarrow_dir, 'include') + import pyarrow + pyarrow_include = pyarrow.get_include() pyarrow_cpp_include = pjoin(pyarrow_include, 'arrow', 'python') assert os.path.exists(pyarrow_include) From 3f0f110a8e0cae154814001c09197cdf0e1848ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 11:17:49 +0100 Subject: [PATCH 03/12] Use the virtualenv / conda env created instead of trying to create a new one for the build --- dev/release/verify-release-candidate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index f91b8de474c2..16eb32b39ea4 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -570,7 +570,7 @@ test_python() { pushd python # Build pyarrow - python -m pip install -e . + python -m pip install --no-build-isolation --editable . # Check mandatory and optional imports python -c " From f7d1f9b7df52f1e5cf4f51e8c183176f9906f0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 12:41:50 +0100 Subject: [PATCH 04/12] The virtualenv must contain the requirements for building --- dev/release/verify-release-candidate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 16eb32b39ea4..d2ba72681477 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -538,7 +538,7 @@ test_python() { show_header "Build and test Python libraries" # Build and test Python - maybe_setup_virtualenv + maybe_setup_virtualenv -r python/requirements-build.txt maybe_setup_conda --file ci/conda_env_python.txt if [ "${USE_CONDA}" -gt 0 ]; then From b865cd52d5d5db2da6892e461aaa4b95267c67bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 13:27:58 +0100 Subject: [PATCH 05/12] Trying to diagnose crash importing flight on macOS intel --- dev/release/verify-release-candidate.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index d2ba72681477..50924904d28d 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -587,6 +587,16 @@ import pyarrow.parquet python -c "import pyarrow.cuda" fi if [ "${ARROW_FLIGHT}" == "ON" ]; then + python -c " +import pyarrow +print(pyarrow.__file__) +import os, sysconfig +ext = sysconfig.get_config_var('EXT_SUFFIX') +flight_so = os.path.join(os.path.dirname(pyarrow.__file__), f'_flight{ext}') +print('exists:', os.path.exists(flight_so)) +os.system(f'otool -L {flight_so}') +os.system(f'otool -L {os.path.dirname(pyarrow.__file__)}/libarrow_flight.2400.dylib') +" python -c "import pyarrow.flight" fi if [ "${ARROW_GANDIVA}" == "ON" ]; then From 612c41b67ed3c83169d4f9085a45689cbd9579e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 14:16:35 +0100 Subject: [PATCH 06/12] Verification jobs shouldn't need to require editable builds --- dev/release/verify-release-candidate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 50924904d28d..1188ba5e3ff9 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -570,7 +570,7 @@ test_python() { pushd python # Build pyarrow - python -m pip install --no-build-isolation --editable . + python -m pip install --no-build-isolation . # Check mandatory and optional imports python -c " From 3ec70f6c9650d7e245d283403ad42a65f6209180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 17:39:16 +0100 Subject: [PATCH 07/12] Avoid testing on the python folder to use the installed pyarrow on the environment --- dev/release/verify-release-candidate.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 1188ba5e3ff9..f3fa724be5c5 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -572,6 +572,8 @@ test_python() { # Build pyarrow python -m pip install --no-build-isolation . + popd + # Check mandatory and optional imports python -c " import pyarrow @@ -611,12 +613,10 @@ os.system(f'otool -L {os.path.dirname(pyarrow.__file__)}/libarrow_flight.2400.dy # Install test dependencies - pip install -r requirements-test.txt + pip install -r python/requirements-test.txt # Execute pyarrow unittests - pytest pyarrow -v - - popd + pytest --pyargs pyarrow -v } test_glib() { From 891821978207b9c6428e6a8ea5229023042179af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 18:11:02 +0100 Subject: [PATCH 08/12] Add a bunch more debugging for macOS intel --- dev/release/verify-release-candidate.sh | 27 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index f3fa724be5c5..282aa9a2f079 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -590,14 +590,27 @@ import pyarrow.parquet fi if [ "${ARROW_FLIGHT}" == "ON" ]; then python -c " -import pyarrow -print(pyarrow.__file__) -import os, sysconfig +import pyarrow, os, sysconfig, subprocess +print('pyarrow location:', pyarrow.__file__) +d = os.path.dirname(pyarrow.__file__) ext = sysconfig.get_config_var('EXT_SUFFIX') -flight_so = os.path.join(os.path.dirname(pyarrow.__file__), f'_flight{ext}') -print('exists:', os.path.exists(flight_so)) -os.system(f'otool -L {flight_so}') -os.system(f'otool -L {os.path.dirname(pyarrow.__file__)}/libarrow_flight.2400.dylib') +flight_so = os.path.join(d, f'_flight{ext}') +print('_flight.so exists:', os.path.exists(flight_so)) +if os.path.exists(flight_so): + subprocess.run(['otool', '-L', flight_so]) + # Show RPATH entries + result = subprocess.run(['otool', '-l', flight_so], capture_output=True, text=True) + lines = result.stdout.splitlines() + for i, line in enumerate(lines): + if 'RPATH' in line or 'rpath' in line: + print(lines[max(0,i-1):i+3]) +flight_dylib = os.path.join(d, 'libarrow_flight.2400.dylib') +print('libarrow_flight.dylib exists:', os.path.exists(flight_dylib)) +print('ARROW_HOME:', os.environ.get('ARROW_HOME', 'NOT SET')) +arrow_lib = os.path.join(os.environ.get('ARROW_HOME', ''), 'lib') +if os.path.isdir(arrow_lib): + print('Arrow libs:', [f for f in os.listdir(arrow_lib) if 'flight' in f]) +print('DYLD_LIBRARY_PATH:', os.environ.get('DYLD_LIBRARY_PATH', 'NOT SET')) " python -c "import pyarrow.flight" fi From 9ef21fda11f4963995ada378a97b2bc172c0f85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 18:47:36 +0100 Subject: [PATCH 09/12] Append _arrow_lib_dir to RPATH so _flight.so (python) can find libarrow_flight.so --- python/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 388e9be4f543..bfbcd131416e 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -293,6 +293,15 @@ message(STATUS "Found Cython version: ${CYTHON_VERSION}") include(GNUInstallDirs) find_package(Arrow REQUIRED) +# When not bundling Arrow C++ libraries on macOS, add the Arrow library +# directory to the RPATH so that the extensions can find libarrow at runtime. +if(APPLE + AND NOT PYARROW_BUNDLE_ARROW_CPP + AND ARROW_SHARED_LIB) + get_filename_component(_arrow_lib_dir "${ARROW_SHARED_LIB}" DIRECTORY) + list(APPEND CMAKE_INSTALL_RPATH "${_arrow_lib_dir}") +endif() + macro(define_option name description arrow_option) set("PYARROW_${name}" "AUTO" From 5f8c18c521b854c392f9dbf4ef69740dc00b306e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 19:50:39 +0100 Subject: [PATCH 10/12] More debugging --- dev/release/verify-release-candidate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 282aa9a2f079..5fc28d7e55be 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -612,7 +612,7 @@ if os.path.isdir(arrow_lib): print('Arrow libs:', [f for f in os.listdir(arrow_lib) if 'flight' in f]) print('DYLD_LIBRARY_PATH:', os.environ.get('DYLD_LIBRARY_PATH', 'NOT SET')) " - python -c "import pyarrow.flight" + python -X faulthandler -c "import pyarrow.flight" fi if [ "${ARROW_GANDIVA}" == "ON" ]; then python -c "import pyarrow.gandiva" From a5ff56da99d53347a9ff16fa97114c30d0e1a465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 24 Mar 2026 20:44:13 +0100 Subject: [PATCH 11/12] Fix protobug 33 and 34 on the same process --- dev/tasks/verify-rc/github.macos.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev/tasks/verify-rc/github.macos.yml b/dev/tasks/verify-rc/github.macos.yml index d20d78307b0f..207fef29181c 100644 --- a/dev/tasks/verify-rc/github.macos.yml +++ b/dev/tasks/verify-rc/github.macos.yml @@ -50,6 +50,10 @@ jobs: brew uninstall pkg-config@0.29.2 || : {% endif %} + # Workaround for https://github.com/grpc/grpc/issues/41755 + # Remove once the runner ships a newer Homebrew. + brew update + brew bundle --file=arrow/cpp/Brewfile brew bundle --file=arrow/c_glib/Brewfile From f9ca17b06e970be1d3791a3a033176daf78e4188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 25 Mar 2026 07:27:11 +0100 Subject: [PATCH 12/12] Remove debugging --- dev/release/verify-release-candidate.sh | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 5fc28d7e55be..9e7deb237251 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -589,30 +589,7 @@ import pyarrow.parquet python -c "import pyarrow.cuda" fi if [ "${ARROW_FLIGHT}" == "ON" ]; then - python -c " -import pyarrow, os, sysconfig, subprocess -print('pyarrow location:', pyarrow.__file__) -d = os.path.dirname(pyarrow.__file__) -ext = sysconfig.get_config_var('EXT_SUFFIX') -flight_so = os.path.join(d, f'_flight{ext}') -print('_flight.so exists:', os.path.exists(flight_so)) -if os.path.exists(flight_so): - subprocess.run(['otool', '-L', flight_so]) - # Show RPATH entries - result = subprocess.run(['otool', '-l', flight_so], capture_output=True, text=True) - lines = result.stdout.splitlines() - for i, line in enumerate(lines): - if 'RPATH' in line or 'rpath' in line: - print(lines[max(0,i-1):i+3]) -flight_dylib = os.path.join(d, 'libarrow_flight.2400.dylib') -print('libarrow_flight.dylib exists:', os.path.exists(flight_dylib)) -print('ARROW_HOME:', os.environ.get('ARROW_HOME', 'NOT SET')) -arrow_lib = os.path.join(os.environ.get('ARROW_HOME', ''), 'lib') -if os.path.isdir(arrow_lib): - print('Arrow libs:', [f for f in os.listdir(arrow_lib) if 'flight' in f]) -print('DYLD_LIBRARY_PATH:', os.environ.get('DYLD_LIBRARY_PATH', 'NOT SET')) -" - python -X faulthandler -c "import pyarrow.flight" + python -c "import pyarrow.flight" fi if [ "${ARROW_GANDIVA}" == "ON" ]; then python -c "import pyarrow.gandiva"