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 2019/06/18 18:27:15 UTC

[arrow] branch master updated: ARROW-5082: [Python] Stop exporting copies of shared libraries in wheel

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 18ccbb9  ARROW-5082: [Python] Stop exporting copies of shared libraries in wheel
18ccbb9 is described below

commit 18ccbb9d1d7a9dc361d32c2c33e1d603bc448b52
Author: François Saint-Jacques <fs...@gmail.com>
AuthorDate: Tue Jun 18 13:27:06 2019 -0500

    ARROW-5082: [Python] Stop exporting copies of shared libraries in wheel
    
    This reduces the size from 50mb to 28mb. I haven't tested if this breaks the OSX wheel. Note that the fix is brittle since currently (on Linux) it links with the full-versioned shared library binary. This works out due to the `-len(x)` sorting applied. A proper fix would be to keep the one linked (found via `ldd` or some other methods). I suspect that auditwheel and subsequent install & test will catch this if the contract were to change.
    
    Author: François Saint-Jacques <fs...@gmail.com>
    
    Closes #4577 from fsaintjacques/ARROW-5082-wheel-size and squashes the following commits:
    
    15932d00b <François Saint-Jacques> ARROW-5082:  Stop exporting copies of shared libraries in wheel
---
 python/manylinux1/build_arrow.sh | 1 +
 python/setup.py                  | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/python/manylinux1/build_arrow.sh b/python/manylinux1/build_arrow.sh
index dbb6acc..aa78b1b 100755
--- a/python/manylinux1/build_arrow.sh
+++ b/python/manylinux1/build_arrow.sh
@@ -111,6 +111,7 @@ PATH="$PATH:${CPYTHON_PATH}/bin" $PYTHON_INTERPRETER setup.py build_ext \
     --bundle-boost \
     --boost-namespace=arrow_boost
 PATH="$PATH:${CPYTHON_PATH}/bin" $PYTHON_INTERPRETER setup.py bdist_wheel
+# Source distribution is used for debian pyarrow packages.
 PATH="$PATH:${CPYTHON_PATH}/bin" $PYTHON_INTERPRETER setup.py sdist
 
 if [ -n "$UBUNTU_WHEELS" ]; then
diff --git a/python/setup.py b/python/setup.py
index 65b9537..18d54b5 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -499,11 +499,6 @@ def _move_shared_libs_unix(build_prefix, build_lib, lib_name):
     lib_filename = os.path.basename(libs[0])
     shutil.move(pjoin(build_prefix, lib_filename),
                 pjoin(build_lib, 'pyarrow', lib_filename))
-    for lib in libs[1:]:
-        filename = os.path.basename(lib)
-        link_name = pjoin(build_lib, 'pyarrow', filename)
-        if not os.path.exists(link_name):
-            os.symlink(lib_filename, link_name)
 
 
 # If the event of not running from a git clone (e.g. from a git archive