You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/01/17 19:50:14 UTC
[arrow] branch master updated: ARROW-1856: [Python] Auto-detect
Parquet ABI version when using PARQUET_HOME
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 1ffce26 ARROW-1856: [Python] Auto-detect Parquet ABI version when using PARQUET_HOME
1ffce26 is described below
commit 1ffce26e3fc659521f42984d8e87bbb93be0ed2c
Author: Korn, Uwe <Uw...@blue-yonder.com>
AuthorDate: Wed Jan 17 14:50:09 2018 -0500
ARROW-1856: [Python] Auto-detect Parquet ABI version when using PARQUET_HOME
Author: Korn, Uwe <Uw...@blue-yonder.com>
Closes #1477 from xhochy/ARROW-1856 and squashes the following commits:
a34ade44 [Korn, Uwe] ARROW-1856: [Python] Auto-detect Parquet ABI version when using PARQUET_HOME
---
cpp/cmake_modules/FindParquet.cmake | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/cpp/cmake_modules/FindParquet.cmake b/cpp/cmake_modules/FindParquet.cmake
index 0339ec5..8bbe05f 100644
--- a/cpp/cmake_modules/FindParquet.cmake
+++ b/cpp/cmake_modules/FindParquet.cmake
@@ -60,8 +60,22 @@ if(PARQUET_HOME)
PATHS ${PARQUET_HOME} NO_DEFAULT_PATH
PATH_SUFFIXES "lib")
get_filename_component(PARQUET_LIBS ${PARQUET_LIBRARIES} PATH )
- set(PARQUET_ABI_VERSION "1.0.0")
- set(PARQUET_SO_VERSION "1")
+
+ # Try to autodiscover the Parquet ABI version
+ get_filename_component(PARQUET_LIB_REALPATH ${PARQUET_LIBRARIES} REALPATH)
+ get_filename_component(PARQUET_EXT_REALPATH ${PARQUET_LIB_REALPATH} EXT)
+ string(REGEX MATCH ".([0-9]+.[0-9]+.[0-9]+)" HAS_ABI_VERSION ${PARQUET_EXT_REALPATH})
+ if (HAS_ABI_VERSION)
+ if (APPLE)
+ string(REGEX REPLACE ".([0-9]+.[0-9]+.[0-9]+).dylib" "\\1" PARQUET_ABI_VERSION ${PARQUET_EXT_REALPATH})
+ else()
+ string(REGEX REPLACE ".so.([0-9]+.[0-9]+.[0-9]+)" "\\1" PARQUET_ABI_VERSION ${PARQUET_EXT_REALPATH})
+ endif()
+ string(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" PARQUET_SO_VERSION ${PARQUET_ABI_VERSION})
+ else()
+ set(PARQUET_ABI_VERSION "1.0.0")
+ set(PARQUET_SO_VERSION "1")
+ endif()
else()
pkg_check_modules(PARQUET parquet)
if (PARQUET_FOUND)
--
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <co...@arrow.apache.org>'].