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/20 15:28:43 UTC

[arrow] branch master updated: ARROW-5633: [Python] Enable bz2 in Linux wheels

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 a0e1fbb  ARROW-5633: [Python] Enable bz2 in Linux wheels
a0e1fbb is described below

commit a0e1fbb9ef51d05a3f28e221cf8c5d4031a50c93
Author: Antoine Pitrou <an...@python.org>
AuthorDate: Thu Jun 20 10:28:36 2019 -0500

    ARROW-5633: [Python] Enable bz2 in Linux wheels
    
    Author: Antoine Pitrou <an...@python.org>
    
    Closes #4628 from pitrou/ARROW-5633-bz2-wheels and squashes the following commits:
    
    5bc9e83b2 <Antoine Pitrou> ARROW-5633:  Enable bz2 in wheels
---
 dev/tasks/python-wheels/win-build.bat    |  2 +-
 python/manylinux1/Dockerfile-x86_64_base |  3 +++
 python/manylinux1/build_arrow.sh         |  1 +
 python/manylinux1/scripts/build_bz2.sh   | 29 +++++++++++++++++++++++++++++
 4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat
index 11b419b..a4ca71b 100644
--- a/dev/tasks/python-wheels/win-build.bat
+++ b/dev/tasks/python-wheels/win-build.bat
@@ -34,7 +34,7 @@ set ARROW_HOME=%CONDA_PREFIX%\Library
 set PARQUET_HOME=%CONDA_PREFIX%\Library
 echo %ARROW_HOME%
 
-@rem Build and test Arrow C++ libraries
+@rem Build Arrow C++ libraries
 mkdir %ARROW_SRC%\cpp\build
 pushd %ARROW_SRC%\cpp\build
 
diff --git a/python/manylinux1/Dockerfile-x86_64_base b/python/manylinux1/Dockerfile-x86_64_base
index 4b4336e..14d4e44 100644
--- a/python/manylinux1/Dockerfile-x86_64_base
+++ b/python/manylinux1/Dockerfile-x86_64_base
@@ -106,3 +106,6 @@ RUN /build_re2.sh
 
 ADD scripts/build_uriparser.sh /
 RUN /build_uriparser.sh
+
+ADD scripts/build_bz2.sh /
+RUN /build_bz2.sh
diff --git a/python/manylinux1/build_arrow.sh b/python/manylinux1/build_arrow.sh
index 237c90a..6c8a2c1 100755
--- a/python/manylinux1/build_arrow.sh
+++ b/python/manylinux1/build_arrow.sh
@@ -93,6 +93,7 @@ PATH="${CPYTHON_PATH}/bin:${PATH}" cmake -DCMAKE_BUILD_TYPE=Release \
     -DARROW_PLASMA=ON \
     -DARROW_TENSORFLOW=ON \
     -DARROW_ORC=ON \
+    -DARROW_WITH_BZ2=ON \
     -DARROW_FLIGHT=${BUILD_ARROW_FLIGHT} \
     -DARROW_GANDIVA=${BUILD_ARROW_GANDIVA} \
     -DARROW_GANDIVA_JAVA=OFF \
diff --git a/python/manylinux1/scripts/build_bz2.sh b/python/manylinux1/scripts/build_bz2.sh
new file mode 100755
index 0000000..fe1de1b
--- /dev/null
+++ b/python/manylinux1/scripts/build_bz2.sh
@@ -0,0 +1,29 @@
+#!/bin/bash -ex
+# 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.
+
+export BZ2_VERSION="1.0.6"
+export CFLAGS="-Wall -Winline -O2 -fPIC -D_FILE_OFFSET_BITS=64"
+
+curl -sL "https://www.sourceware.org/pub/bzip2/bzip2-${BZ2_VERSION}.tar.gz" -o bzip2-${BZ2_VERSION}.tar.gz
+tar xf bzip2-${BZ2_VERSION}.tar.gz
+
+pushd bzip2-${BZ2_VERSION}
+make PREFIX=/usr CFLAGS="$CFLAGS" install -j8
+popd
+
+rm -rf bzip2-${BZ2_VERSION}.tar.gz bzip2-${BZ2_VERSION}