Skip to content

Commit

Permalink
Fix arrow versioning logic (#15755)
Browse files Browse the repository at this point in the history
Resolves #15754

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #15755
  • Loading branch information
vyasr authored May 15, 2024
1 parent 2fb8efb commit 0fea3ed
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
21 changes: 14 additions & 7 deletions cpp/cmake/thirdparty/get_arrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ include_guard(GLOBAL)
# pyarrow.
function(find_libarrow_in_python_wheel PYARROW_VERSION)
string(REPLACE "." ";" PYARROW_VER_COMPONENTS "${PYARROW_VERSION}")
list(GET PYARROW_VER_COMPONENTS 0 PYARROW_SO_VER)
# The soname for Arrow libraries is constructed using the major version plus "00". Note that,
# although it may seem like it due to Arrow almost exclusively releasing new major versions (i.e.
# `${MINOR_VERSION}${PATCH_VERSION}` is almost always equivalent to "00"),
# the soname is not generated by concatenating the major, minor, and patch versions into a single
# version number soname, just `${MAJOR_VERSION}00`
set(PYARROW_LIB "libarrow.so.${PYARROW_SO_VER}00")
list(GET PYARROW_VER_COMPONENTS 0 PYARROW_MAJOR_VER)
list(GET PYARROW_VER_COMPONENTS 1 PYARROW_MINOR_VER)

# Ensure that the major and minor versions are two digits long
string(LENGTH ${PYARROW_MAJOR_VER} PYARROW_MAJOR_LENGTH)
string(LENGTH ${PYARROW_MINOR_VER} PYARROW_MINOR_LENGTH)
if(${PYARROW_MAJOR_LENGTH} EQUAL 1)
set(PYARROW_MAJOR_VER "0${PYARROW_MAJOR_VER}")
endif()
if(${PYARROW_MINOR_LENGTH} EQUAL 1)
set(PYARROW_MINOR_VER "0${PYARROW_MINOR_VER}")
endif()

set(PYARROW_LIB "libarrow.so.${PYARROW_MAJOR_VER}${PYARROW_MINOR_VER}")

string(
APPEND
Expand Down
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
# Allow runtime version to float up to minor version
- pyarrow>=16.0.0,<17.0.0a0
# Allow runtime version to float up to patch version
- pyarrow>=16.0.0,<16.1.0a0
cuda_version:
specific:
- output_types: conda
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [
"packaging",
"pandas>=2.0,<2.2.3dev0",
"ptxcompiler",
"pyarrow>=16.0.0,<17.0.0a0",
"pyarrow>=16.0.0,<16.1.0a0",
"rich",
"rmm==24.6.*",
"typing_extensions>=4.0.0",
Expand Down

0 comments on commit 0fea3ed

Please sign in to comment.