[
https://issues.apache.org/jira/browse/ARROW-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329325#comment-16329325
]
ASF GitHub Bot commented on ARROW-1856:
---------------------------------------
wesm closed pull request #1477: ARROW-1856: [Python] Auto-detect Parquet ABI
version when using PARQUET_HOME
URL: https://github.com/apache/arrow/pull/1477
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/cpp/cmake_modules/FindParquet.cmake
b/cpp/cmake_modules/FindParquet.cmake
index 0339ec56a..8bbe05f12 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)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Python] Auto-detect Parquet ABI version when using PARQUET_HOME
> ----------------------------------------------------------------
>
> Key: ARROW-1856
> URL: https://issues.apache.org/jira/browse/ARROW-1856
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.7.1
> Reporter: Uwe L. Korn
> Assignee: Uwe L. Korn
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.9.0
>
>
> Current we hardcode 1.0.0 in the case that {{PARQUET_HOME}} is set, we should
> try to detect the correct version by either globbing on
> {{libparquet.1.*.so/dylib}} or by install a {{CMakeConfig}} for
> {{parquet-cpp}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)