Skip to content

Commit 720d422

Browse files
wesmxhochy
authored andcommitted
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 <wes.mckinney@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
1 parent c05292f commit 720d422

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

ci/travis_script_python.sh

+46-4
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,52 @@ export ARROW_HOME=$ARROW_CPP_INSTALL
2626
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ARROW_CPP_INSTALL/lib
2727

2828
pushd $PYTHON_DIR
29+
export PARQUET_HOME=$TRAVIS_BUILD_DIR/parquet-env
30+
31+
build_parquet_cpp() {
32+
conda create -y -q -p $PARQUET_HOME thrift-cpp snappy zlib brotli boost
33+
source activate $PARQUET_HOME
34+
35+
export BOOST_ROOT=$PARQUET_HOME
36+
export SNAPPY_HOME=$PARQUET_HOME
37+
export THRIFT_HOME=$PARQUET_HOME
38+
export ZLIB_HOME=$PARQUET_HOME
39+
export BROTLI_HOME=$PARQUET_HOME
40+
41+
PARQUET_DIR=$TRAVIS_BUILD_DIR/parquet
42+
mkdir -p $PARQUET_DIR
43+
44+
git clone https://github.com/apache/parquet-cpp.git $PARQUET_DIR
45+
46+
pushd $PARQUET_DIR
47+
mkdir build-dir
48+
cd build-dir
49+
50+
cmake \
51+
-DCMAKE_BUILD_TYPE=debug \
52+
-DCMAKE_INSTALL_PREFIX=$PARQUET_HOME \
53+
-DPARQUET_ARROW=on \
54+
-DPARQUET_BUILD_BENCHMARKS=off \
55+
-DPARQUET_BUILD_EXECUTABLES=off \
56+
-DPARQUET_ZLIB_VENDORED=off \
57+
-DPARQUET_BUILD_TESTS=off \
58+
..
59+
60+
make -j${CPU_COUNT}
61+
make install
62+
63+
popd
64+
}
65+
66+
build_parquet_cpp
67+
68+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PARQUET_HOME/lib
2969

3070
python_version_tests() {
3171
PYTHON_VERSION=$1
32-
CONDA_ENV_NAME="pyarrow-test-${PYTHON_VERSION}"
33-
conda create -y -q -n $CONDA_ENV_NAME python=$PYTHON_VERSION
34-
source activate $CONDA_ENV_NAME
72+
CONDA_ENV_DIR=$TRAVIS_BUILD_DIR/pyarrow-test-$PYTHON_VERSION
73+
conda create -y -q -p $CONDA_ENV_DIR python=$PYTHON_VERSION
74+
source activate $CONDA_ENV_DIR
3575

3676
python --version
3777
which python
@@ -45,7 +85,9 @@ python_version_tests() {
4585
# Other stuff pip install
4686
pip install -r requirements.txt
4787

48-
python setup.py build_ext --inplace
88+
python setup.py build_ext --inplace --with-parquet
89+
90+
python -c "import pyarrow.parquet"
4991

5092
python -m pytest -vv -r sxX pyarrow
5193

0 commit comments

Comments
 (0)