You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2017/02/03 08:08:22 UTC

arrow git commit: ARROW-467: [Python] Run Python parquet-cpp unit tests in Travis CI

Repository: arrow
Updated Branches:
  refs/heads/master c05292faf -> 720d422fa


ARROW-467: [Python] Run Python parquet-cpp unit tests in Travis CI

This means we'll have to tolerate broken builds whenever APIs change (a good incentive to avoid changing them as much as possible)

Author: Wes McKinney <we...@twosigma.com>

Closes #311 from wesm/ARROW-467 and squashes the following commits:

a9c285d [Wes McKinney] parquet-cpp build tweaks
661671c [Wes McKinney] Build parquet-cpp from source and run PyArrow Parquet unit tests in Travis CI


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/720d422f
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/720d422f
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/720d422f

Branch: refs/heads/master
Commit: 720d422fa761e2beab1b412b1b42c041ac2db1a4
Parents: c05292f
Author: Wes McKinney <we...@twosigma.com>
Authored: Fri Feb 3 09:08:14 2017 +0100
Committer: Uwe L. Korn <uw...@xhochy.com>
Committed: Fri Feb 3 09:08:14 2017 +0100

----------------------------------------------------------------------
 ci/travis_script_python.sh | 50 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 46 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/720d422f/ci/travis_script_python.sh
----------------------------------------------------------------------
diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh
index 179567b..c186fd4 100755
--- a/ci/travis_script_python.sh
+++ b/ci/travis_script_python.sh
@@ -26,12 +26,52 @@ export ARROW_HOME=$ARROW_CPP_INSTALL
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ARROW_CPP_INSTALL/lib
 
 pushd $PYTHON_DIR
+export PARQUET_HOME=$TRAVIS_BUILD_DIR/parquet-env
+
+build_parquet_cpp() {
+  conda create -y -q -p $PARQUET_HOME thrift-cpp snappy zlib brotli boost
+  source activate $PARQUET_HOME
+
+  export BOOST_ROOT=$PARQUET_HOME
+  export SNAPPY_HOME=$PARQUET_HOME
+  export THRIFT_HOME=$PARQUET_HOME
+  export ZLIB_HOME=$PARQUET_HOME
+  export BROTLI_HOME=$PARQUET_HOME
+
+  PARQUET_DIR=$TRAVIS_BUILD_DIR/parquet
+  mkdir -p $PARQUET_DIR
+
+  git clone https://github.com/apache/parquet-cpp.git $PARQUET_DIR
+
+  pushd $PARQUET_DIR
+  mkdir build-dir
+  cd build-dir
+
+  cmake \
+      -DCMAKE_BUILD_TYPE=debug \
+      -DCMAKE_INSTALL_PREFIX=$PARQUET_HOME \
+      -DPARQUET_ARROW=on \
+      -DPARQUET_BUILD_BENCHMARKS=off \
+      -DPARQUET_BUILD_EXECUTABLES=off \
+      -DPARQUET_ZLIB_VENDORED=off \
+      -DPARQUET_BUILD_TESTS=off \
+      ..
+
+  make -j${CPU_COUNT}
+  make install
+
+  popd
+}
+
+build_parquet_cpp
+
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PARQUET_HOME/lib
 
 python_version_tests() {
   PYTHON_VERSION=$1
-  CONDA_ENV_NAME="pyarrow-test-${PYTHON_VERSION}"
-  conda create -y -q -n $CONDA_ENV_NAME python=$PYTHON_VERSION
-  source activate $CONDA_ENV_NAME
+  CONDA_ENV_DIR=$TRAVIS_BUILD_DIR/pyarrow-test-$PYTHON_VERSION
+  conda create -y -q -p $CONDA_ENV_DIR python=$PYTHON_VERSION
+  source activate $CONDA_ENV_DIR
 
   python --version
   which python
@@ -45,7 +85,9 @@ python_version_tests() {
   # Other stuff pip install
   pip install -r requirements.txt
 
-  python setup.py build_ext --inplace
+  python setup.py build_ext --inplace --with-parquet
+
+  python -c "import pyarrow.parquet"
 
   python -m pytest -vv -r sxX pyarrow