From 5bc9e83b2b8c636d4fce3f60c683a40c3476a773 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 20 Jun 2019 13:27:29 +0200 Subject: [PATCH] ARROW-5633: [Python] 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(-) create mode 100755 python/manylinux1/scripts/build_bz2.sh diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat index 11b419b2f94..a4ca71bff16 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 4b4336e9ec0..14d4e449dba 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 237c90a0401..6c8a2c1281c 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 00000000000..fe1de1b89f7 --- /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}