Skip to content

Apache DataFusion SQL Query Engine

ARROW-5082: [Python] Substantially reduce Python wheel package and install size

Wes McKinney0d951185cd6e
diff --git a/dev/tasks/python-wheels/manylinux-test.sh b/dev/tasks/python-wheels/manylinux-test.sh
index bd751df7b4..fd5e2284b0 100755
--- a/dev/tasks/python-wheels/manylinux-test.sh
+++ b/dev/tasks/python-wheels/manylinux-test.sh
@@ -20,6 +20,7 @@
set -e
export ARROW_TEST_DATA=/arrow/testing/data
+export PYARROW_TEST_CYTHON=OFF
python --version
# Install built wheel
@@ -44,5 +45,4 @@ import pyarrow.fs
import pyarrow._hdfs
import pyarrow.dataset
import pyarrow.flight
-import pyarrow.gandiva
"
diff --git a/dev/tasks/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.sh
index aea4c62e00..af54a02c01 100755
--- a/dev/tasks/python-wheels/osx-build.sh
+++ b/dev/tasks/python-wheels/osx-build.sh
@@ -52,8 +52,9 @@ function build_wheel {
pip install $(pip_opts) -r python/requirements-wheel-build.txt
- export PYARROW_WITH_GANDIVA=1
- export BUILD_ARROW_GANDIVA=ON
+ export PYARROW_INSTALL_TESTS=1
+ export PYARROW_WITH_GANDIVA=0
+ export BUILD_ARROW_GANDIVA=OFF
git submodule update --init
export ARROW_TEST_DATA=`pwd`/testing/data
@@ -137,6 +138,8 @@ function install_wheel {
function run_unit_tests {
pushd $1
+ export PYARROW_TEST_CYTHON=OFF
+
# Install test dependencies
pip install $(pip_opts) -r python/requirements-wheel-test.txt
@@ -156,6 +159,5 @@ import pyarrow.fs
import pyarrow._hdfs
import pyarrow.dataset
import pyarrow.flight
-import pyarrow.gandiva
"
}
diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat
index b7bd25faef..00e6964235 100644
--- a/dev/tasks/python-wheels/win-build.bat
+++ b/dev/tasks/python-wheels/win-build.bat
@@ -17,10 +17,14 @@
@echo on
+@rem Building Gandiva in the wheels is disabled for now to make the wheels
+@rem smaller.
+
+@rem --file=%ARROW_SRC%\ci\conda_env_gandiva.yml ^
+
@rem create conda environment for compiling
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 ^
"vs2015_runtime<14.16" ^
python=%PYTHON_VERSION% || exit /B
@@ -61,7 +65,7 @@ cmake -G "%GENERATOR%" ^
-DARROW_FLIGHT=ON ^
-DARROW_PYTHON=ON ^
-DARROW_PARQUET=ON ^
- -DARROW_GANDIVA=ON ^
+ -DARROW_GANDIVA=OFF ^
-DARROW_MIMAllOC=ON ^
-DZSTD_SOURCE=BUNDLED ^
.. || exit /B
@@ -70,9 +74,10 @@ popd
set PYARROW_BUILD_TYPE=Release
set PYARROW_PARALLEL=8
+set PYARROW_INSTALL_TESTS=1
set PYARROW_WITH_DATASET=1
set PYARROW_WITH_FLIGHT=1
-set PYARROW_WITH_GANDIVA=1
+set PYARROW_WITH_GANDIVA=0
set PYARROW_WITH_PARQUET=1
set PYARROW_WITH_STATIC_BOOST=1
set PYARROW_BUNDLE_ARROW_CPP=1
@@ -96,7 +101,6 @@ set ARROW_TEST_DATA=%ARROW_SRC%\testing\data
%PYTHON_INTERPRETER% -c "import pyarrow" || exit /B
%PYTHON_INTERPRETER% -c "import pyarrow.parquet" || exit /B
%PYTHON_INTERPRETER% -c "import pyarrow.flight" || exit /B
-%PYTHON_INTERPRETER% -c "import pyarrow.gandiva" || exit /B
%PYTHON_INTERPRETER% -c "import pyarrow.dataset" || exit /B
@rem run the python tests, but disable the cython because there is a linking