[
https://issues.apache.org/jira/browse/ARROW-2087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356030#comment-16356030
]
ASF GitHub Bot commented on ARROW-2087:
---------------------------------------
wesm closed pull request #1564: ARROW-2087: [Python] Binaries of 3rdparty are
not stripped in manylinux1 base image
URL: https://github.com/apache/arrow/pull/1564
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/python/manylinux1/Dockerfile-x86_64
b/python/manylinux1/Dockerfile-x86_64
index 98b559535..1ade9ab10 100644
--- a/python/manylinux1/Dockerfile-x86_64
+++ b/python/manylinux1/Dockerfile-x86_64
@@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-FROM quay.io/xhochy/arrow_manylinux1_x86_64_base:ARROW-2086
+FROM quay.io/xhochy/arrow_manylinux1_x86_64_base:ARROW-2087
ADD arrow /arrow
WORKDIR /arrow/cpp
diff --git a/python/manylinux1/Dockerfile-x86_64_base
b/python/manylinux1/Dockerfile-x86_64_base
index b7687533a..1f15f77d8 100644
--- a/python/manylinux1/Dockerfile-x86_64_base
+++ b/python/manylinux1/Dockerfile-x86_64_base
@@ -28,11 +28,9 @@ RUN /build_boost.sh
ADD scripts/build_jemalloc.sh /
RUN /build_jemalloc.sh
-WORKDIR /
# Install cmake manylinux1 package
-RUN /opt/python/cp35-cp35m/bin/pip install cmake ninja
-RUN ln -s /opt/python/cp35-cp35m/bin/cmake /usr/bin/cmake
-RUN ln -s /opt/python/cp35-cp35m/bin/ninja /usr/bin/ninja
+ADD scripts/install_cmake.sh /
+RUN /install_cmake.sh
ADD scripts/build_gtest.sh /
RUN /build_gtest.sh
@@ -69,10 +67,7 @@ ADD scripts/build_ccache.sh /
RUN /build_ccache.sh
WORKDIR /
-RUN git clone https://github.com/matthew-brett/multibuild.git
-WORKDIR /multibuild
-RUN git checkout ffe59955ad8690c2f8bb74766cb7e9b0d0ee3963
-WORKDIR /
+RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild
&& git checkout ffe59955ad8690c2f8bb74766cb7e9b0d0ee3963
ADD scripts/build_virtualenvs.sh /
RUN /build_virtualenvs.sh
diff --git a/python/manylinux1/scripts/build_virtualenvs.sh
b/python/manylinux1/scripts/build_virtualenvs.sh
index e64157065..b54861126 100755
--- a/python/manylinux1/scripts/build_virtualenvs.sh
+++ b/python/manylinux1/scripts/build_virtualenvs.sh
@@ -33,18 +33,26 @@ for PYTHON in ${PYTHON_VERSIONS}; do
PATH="$PATH:$(cpython_path $PYTHON)"
echo "=== (${PYTHON}) Installing build dependencies ==="
- $PIPI_IO "numpy==1.10.1"
+ $PIPI_IO "numpy==1.10.4"
$PIPI_IO "cython==0.25.2"
- $PIPI_IO "pandas==0.20.1"
+ $PIPI_IO "pandas==0.20.3"
$PIPI_IO "virtualenv==15.1.0"
echo "=== (${PYTHON}) Preparing virtualenv for tests ==="
"$(cpython_path $PYTHON)/bin/virtualenv" -p ${PYTHON_INTERPRETER}
--no-download /venv-test-${PYTHON}
source /venv-test-${PYTHON}/bin/activate
- pip install pytest 'numpy==1.12.1' 'pandas==0.20.1'
+ pip install pytest 'numpy==1.14.0' 'pandas==0.20.3'
deactivate
done
+# Remove debug symbols from libraries that were installed via wheel.
+find /venv-test-*/lib/*/site-packages/pandas -name '*.so' -exec strip '{}' ';'
+find /venv-test-*/lib/*/site-packages/numpy -name '*.so' -exec strip '{}' ';'
+find /opt/_internal/cpython-*/lib/*/site-packages/pandas -name '*.so' -exec
strip '{}' ';'
+# Only Python 3.6 packages are stripable as they are built inside of the image
+find /opt/_internal/cpython-3.6.4/lib/python3.6/site-packages/numpy -name
'*.so' -exec strip '{}' ';'
+find /opt/_internal/*/lib/*/site-packages/Cython -name '*.so' -exec strip '{}'
';'
+
# Remove pip cache again. It's useful during the virtualenv creation but we
# don't want it persisted in the docker layer, ~264MiB
rm -rf /root/.cache
diff --git a/python/manylinux1/scripts/install_cmake.sh
b/python/manylinux1/scripts/install_cmake.sh
new file mode 100755
index 000000000..864348514
--- /dev/null
+++ b/python/manylinux1/scripts/install_cmake.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+/opt/python/cp35-cp35m/bin/pip install cmake ninja
+ln -s /opt/python/cp35-cp35m/bin/cmake /usr/bin/cmake
+ln -s /opt/python/cp35-cp35m/bin/ninja /usr/bin/ninja
+strip /opt/_internal/cpython-3.5.4/lib/python3.5/site-packages/cmake/data/bin/*
----------------------------------------------------------------
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] Binaries of 3rdparty are not stripped in manylinux1 base image
> -----------------------------------------------------------------------
>
> Key: ARROW-2087
> URL: https://issues.apache.org/jira/browse/ARROW-2087
> Project: Apache Arrow
> Issue Type: Improvement
> Reporter: Uwe L. Korn
> Assignee: Uwe L. Korn
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.9.0
>
>
> CMake pip package:
> [https://github.com/scikit-build/cmake-python-distributions/issues/32]
> Pandas pip package: [https://github.com/pandas-dev/pandas/issues/19531]
> NumPy pip package: https://github.com/numpy/numpy/issues/10519
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)