Skip to content

Apache DataFusion SQL Query Engine

ARROW-5656: [Python][Packaging] Fix macOS wheel builds, add Flight support

Wes McKinney1cf935e08c70
diff --git a/dev/tasks/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.sh
index 9fef5b944a..be39754e81 100755
--- a/dev/tasks/python-wheels/osx-build.sh
+++ b/dev/tasks/python-wheels/osx-build.sh
@@ -22,7 +22,9 @@ set -e
# overrides multibuild's default build_wheel
function build_wheel {
pip install -U pip
- pip install setuptools_scm
+
+ # ARROW-5670: Python 3.5 can fail with HTTPS error in CMake build
+ pip install setuptools_scm requests
# Include brew installed versions of flex and bison.
# We need them to build Thrift. The ones that come with Xcode are too old.
@@ -111,6 +113,9 @@ function build_wheel {
export BUILD_ARROW_GANDIVA=OFF
fi
+ git submodule update --init
+ export ARROW_TEST_DATA=`pwd`/testing/data
+
pushd cpp
mkdir build
pushd build
@@ -129,6 +134,8 @@ function build_wheel {
-DARROW_ORC=ON \
-DBOOST_ROOT="$arrow_boost_dist" \
-DBoost_NAMESPACE=arrow_boost \
+ -DARROW_FLIGHT=ON \
+ -DgRPC_SOURCE=SYSTEM \
-DMAKE=make \
..
make -j5
@@ -143,6 +150,7 @@ function build_wheel {
unset ARROW_HOME
unset PARQUET_HOME
+ export PYARROW_WITH_FLIGHT=1
export PYARROW_WITH_PLASMA=1
export PYARROW_WITH_PARQUET=1
export PYARROW_WITH_ORC=1
@@ -186,6 +194,7 @@ import pyarrow.parquet
import pyarrow.plasma
if sys.version_info.major > 2:
+ import pyarrow.flight
import pyarrow.gandiva
"
diff --git a/dev/tasks/python-wheels/travis.osx.yml b/dev/tasks/python-wheels/travis.osx.yml
index 919bcf54a7..2db3208dbc 100644
--- a/dev/tasks/python-wheels/travis.osx.yml
+++ b/dev/tasks/python-wheels/travis.osx.yml
@@ -38,17 +38,24 @@ before_install:
- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- git -C arrow checkout {{ arrow.head }}
+ # ARROW-3976 Old versions of git can cause failures when Homebrew prints a
+ # donation solicitation. Attempt to update git
+ - git --version
+ - brew upgrade git
+
# Also remove artifacts that depend on Boost
- brew uninstall boost cgal postgis sfcgal
- brew update
- brew upgrade cmake
- - brew install bison flex llvm@7
+ - brew install bison flex grpc openssl llvm@7
- export CONFIG_PATH=`pwd`/arrow/dev/tasks/python-wheels/osx-build.sh
- source multibuild/common_utils.sh
- source multibuild/travis_osx_steps.sh
- before_install
+ # Fix SSL TLS issue for Python 3.5 on macOS
+ - pip install requests[security]
install:
- mkdir -p dist
diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat
index a4ca71bff1..56b009705f 100644
--- a/dev/tasks/python-wheels/win-build.bat
+++ b/dev/tasks/python-wheels/win-build.bat
@@ -23,13 +23,16 @@ conda update --yes --quiet conda
call conda create -n wheel-build -q -y -c conda-forge ^
--file=%ARROW_SRC%\ci\conda_env_cpp.yml ^
--file=%ARROW_SRC%\ci\conda_env_gandiva.yml ^
- --file=%ARROW_SRC%\ci\conda_env_python.yml ^
python=%PYTHON_VERSION% ^
numpy=%NUMPY_VERSION% ^
|| exit /B
call activate wheel-build
+@rem Cannot use conda_env_python.yml here because conda-forge has
+@rem ceased providing up-to-date packages for Python 3.5
+pip install -r %ARROW_SRC%\python\requirements-wheel.txt
+
set ARROW_HOME=%CONDA_PREFIX%\Library
set PARQUET_HOME=%CONDA_PREFIX%\Library
echo %ARROW_HOME%