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 aad0782  ARROW-1857: [Python] Add switch for boost linkage with static 
parquet in wheels
aad0782 is described below

commit aad07824a41c4721992ee8ae2ce4a6c3a154e3ec
Author: Uwe L. Korn <[email protected]>
AuthorDate: Wed Dec 6 14:11:20 2017 -0500

    ARROW-1857: [Python] Add switch for boost linkage with static parquet in 
wheels
    
    Author: Uwe L. Korn <[email protected]>
    
    Closes #1395 from xhochy/ARROW-1857 and squashes the following commits:
    
    71d97bc7 [Uwe L. Korn] ARROW-1857: [Python] Add switch for boost linkage 
with static parquet in wheels
---
 python/CMakeLists.txt | 9 ++++++++-
 python/setup.py       | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 00a4ee6..cbbb464 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -64,6 +64,9 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL 
"${CMAKE_CURRENT_SOURCE_DIR}")
   option(PYARROW_PARQUET_USE_SHARED
     "Rely on parquet shared libraries where relevant"
     ON)
+  option(PYARROW_BOOST_USE_SHARED
+    "Rely on boost shared libraries on linking static parquet"
+    OFF)
   option(PYARROW_BUILD_PLASMA
     "Build the PyArrow Plasma integration"
     OFF)
@@ -306,7 +309,11 @@ if (PYARROW_BUILD_PARQUET)
       parquet_shared)
   else()
     find_package(Thrift)
-    set(Boost_USE_STATIC_LIBS ON)
+    if (PYARROW_BOOST_USE_SHARED)
+      set(Boost_USE_STATIC_LIBS OFF)
+    else()
+      set(Boost_USE_STATIC_LIBS ON)
+    endif()
     find_package(Boost COMPONENTS regex REQUIRED)
     ADD_THIRDPARTY_LIB(boost_regex
       STATIC_LIB ${Boost_REGEX_LIBRARY_RELEASE})
diff --git a/python/setup.py b/python/setup.py
index 8111586..32e76ab 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -105,6 +105,8 @@ class build_ext(_build_ext):
             os.environ.get('PYARROW_WITH_PARQUET', '0'))
         self.with_static_parquet = strtobool(
             os.environ.get('PYARROW_WITH_STATIC_PARQUET', '0'))
+        self.with_static_boost = strtobool(
+            os.environ.get('PYARROW_WITH_STATIC_BOOST', '1'))
         self.with_plasma = strtobool(
             os.environ.get('PYARROW_WITH_PLASMA', '0'))
         self.bundle_arrow_cpp = strtobool(
@@ -149,6 +151,8 @@ class build_ext(_build_ext):
             cmake_options.append('-DPYARROW_BUILD_PARQUET=on')
         if self.with_static_parquet:
             cmake_options.append('-DPYARROW_PARQUET_USE_SHARED=off')
+        if not self.with_static_boost:
+            cmake_options.append('-DPYARROW_BOOST_USE_SHARED=on')
 
         if self.with_plasma:
             cmake_options.append('-DPYARROW_BUILD_PLASMA=on')

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to