arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject arrow git commit: ARROW-853: [Python] Only set RPATH when bundling the shared libraries
Date Wed, 19 Apr 2017 17:42:54 GMT
Repository: arrow
Updated Branches:
  refs/heads/master 4555ab92b -> 41a8ff9ad


ARROW-853: [Python] Only set RPATH when bundling the shared libraries

See discussion in https://github.com/apache/arrow/pull/562. Modifying RPATH is no longer needed
when libarrow/libarrow_python are installed someplace else in the loader path.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #564 from wesm/ARROW-853 and squashes the following commits:

262f43a [Wes McKinney] Only set RPATH when bundling the shared libraries


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/41a8ff9a
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/41a8ff9a
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/41a8ff9a

Branch: refs/heads/master
Commit: 41a8ff9ad18a4970c16b674b56ade25b8e8986ec
Parents: 4555ab9
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Wed Apr 19 19:42:49 2017 +0200
Committer: Uwe L. Korn <uwelk@xhochy.com>
Committed: Wed Apr 19 19:42:49 2017 +0200

----------------------------------------------------------------------
 python/CMakeLists.txt | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/41a8ff9a/python/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 3db7b7b..0d34bcd 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -346,21 +346,25 @@ foreach(module ${CYTHON_EXTENSIONS})
           LIBRARY_OUTPUT_DIRECTORY ${module_output_directory})
     endif()
 
-    if(APPLE)
+    if (PYARROW_BUNDLE_ARROW_CPP)
+      # In the event that we are bundling the shared libraries (e.g. in a
+      # manylinux1 wheel), we need to set the RPATH of the extensions to the
+      # root of the pyarrow/ package so that libarrow/libarrow_python are able
+      # to be loaded properly
+      if(APPLE)
         set(module_install_rpath "@loader_path")
-    else()
+      else()
         set(module_install_rpath "\$ORIGIN")
-    endif()
-    list(LENGTH directories i)
-    while(${i} GREATER 0)
+      endif()
+      list(LENGTH directories i)
+      while(${i} GREATER 0)
         set(module_install_rpath "${module_install_rpath}/..")
         math(EXPR i "${i} - 1" )
-    endwhile(${i} GREATER 0)
+      endwhile(${i} GREATER 0)
 
-    # for inplace development for now
-    #set(module_install_rpath "${CMAKE_SOURCE_DIR}/pyarrow/")
+      set_target_properties(${module_name} PROPERTIES
+        INSTALL_RPATH ${module_install_rpath})
+    endif()
 
-    set_target_properties(${module_name} PROPERTIES
-      INSTALL_RPATH ${module_install_rpath})
     target_link_libraries(${module_name} ${LINK_LIBS})
 endforeach(module)


Mime
View raw message