@@ -21,114 +21,72 @@ set -e
2121source $TRAVIS_BUILD_DIR /ci/travis_env_common.sh
2222
2323export ARROW_HOME=$ARROW_CPP_INSTALL
24- export PARQUET_HOME=$TRAVIS_BUILD_DIR /parquet-env
24+ export PARQUET_HOME=$ARROW_PYTHON_PARQUET_HOME
2525export LD_LIBRARY_PATH=$ARROW_HOME /lib:$PARQUET_HOME /lib:$LD_LIBRARY_PATH
2626export PYARROW_CXXFLAGS=" -Werror"
2727
28- build_parquet_cpp () {
29- export PARQUET_ARROW_VERSION= $( git rev-parse HEAD )
28+ PYTHON_VERSION= $1
29+ CONDA_ENV_DIR= $TRAVIS_BUILD_DIR /pyarrow-test- $PYTHON_VERSION
3030
31- # $CPP_TOOLCHAIN set up in before_script_cpp
32- export PARQUET_BUILD_TOOLCHAIN= $CPP_TOOLCHAIN
31+ conda create -y -q -p $CONDA_ENV_DIR python= $PYTHON_VERSION cmake curl
32+ source activate $CONDA_ENV_DIR
3333
34- PARQUET_DIR= $TRAVIS_BUILD_DIR /parquet
35- mkdir -p $PARQUET_DIR
34+ python --version
35+ which python
3636
37- git clone https://github.com/apache/parquet-cpp.git $PARQUET_DIR
37+ # faster builds, please
38+ conda install -y -q nomkl
3839
39- pushd $PARQUET_DIR
40- mkdir build-dir
41- cd build-dir
40+ # Expensive dependencies install from Continuum package repo
41+ conda install -y -q pip numpy pandas cython flake8
4242
43- cmake \
44- -GNinja \
45- -DCMAKE_BUILD_TYPE=debug \
46- -DCMAKE_INSTALL_PREFIX=$PARQUET_HOME \
47- -DPARQUET_BOOST_USE_SHARED=off \
48- -DPARQUET_BUILD_BENCHMARKS=off \
49- -DPARQUET_BUILD_EXECUTABLES=off \
50- -DPARQUET_BUILD_TESTS=off \
51- ..
43+ # Build C++ libraries
44+ pushd $ARROW_CPP_BUILD_DIR
5245
53- ninja
54- ninja install
46+ # Clear out prior build files
47+ rm -rf *
5548
56- popd
57- }
58-
59- build_parquet_cpp
60-
61- function rebuild_arrow_libraries() {
62- pushd $ARROW_CPP_BUILD_DIR
63-
64- # Clear out prior build files
65- rm -rf *
66-
67- cmake -GNinja \
68- -DARROW_BUILD_TESTS=off \
69- -DARROW_BUILD_UTILITIES=off \
70- -DARROW_PLASMA=on \
71- -DARROW_PYTHON=on \
72- -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
73- $ARROW_CPP_DIR
74-
75- ninja
76- ninja install
49+ cmake -GNinja \
50+ -DARROW_BUILD_TESTS=off \
51+ -DARROW_BUILD_UTILITIES=off \
52+ -DARROW_PLASMA=on \
53+ -DARROW_PYTHON=on \
54+ -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
55+ $ARROW_CPP_DIR
7756
78- popd
79- }
57+ ninja
58+ ninja install
8059
81- python_version_tests () {
82- PYTHON_VERSION=$1
83- CONDA_ENV_DIR=$TRAVIS_BUILD_DIR /pyarrow-test-$PYTHON_VERSION
60+ popd
8461
85- conda create -y -q -p $CONDA_ENV_DIR python= $PYTHON_VERSION cmake curl
86- source activate $CONDA_ENV_DIR
62+ # Other stuff pip install
63+ pushd $ARROW_PYTHON_DIR
8764
88- python --version
89- which python
65+ # Fail fast on style checks
66+ flake8 --count pyarrow
9067
91- # faster builds, please
92- conda install -y -q nomkl
68+ # Check Cython files with some checks turned off
69+ flake8 --count --config=.flake8.cython pyarrow
9370
94- # Expensive dependencies install from Continuum package repo
95- conda install -y -q pip numpy pandas cython flake8
71+ pip install -r requirements.txt
72+ python setup.py build_ext --with-parquet --with-plasma \
73+ install --single-version-externally-managed --record=record.text
74+ popd
9675
97- # Fail fast on style checks
98- flake8 --count pyarrow
76+ python -c " import pyarrow.parquet "
77+ python -c " import pyarrow.plasma "
9978
100- # Check Cython files with some checks turned off
101- flake8 --count --config=.flake8.cython pyarrow
79+ if [ $TRAVIS_OS_NAME == " linux" ]; then
80+ export PLASMA_VALGRIND=1
81+ fi
10282
103- # Build C++ libraries
104- rebuild_arrow_libraries
83+ PYARROW_PATH= $CONDA_PREFIX /lib/python $PYTHON_VERSION /site-packages/pyarrow
84+ python -m pytest -vv -r sxX -s $PYARROW_PATH --parquet
10585
106- # Other stuff pip install
107- pushd $ARROW_PYTHON_DIR
108- pip install -r requirements.txt
109- python setup.py build_ext --with-parquet --with-plasma \
110- install --single-version-externally-managed --record=record.text
86+ if [ " $PYTHON_VERSION " == " 3.6 " ] && [ $TRAVIS_OS_NAME == " linux " ] ; then
87+ # Build documentation once
88+ pushd $ARROW_PYTHON_DIR /doc
89+ conda install -y -q --file=requirements.txt
90+ sphinx-build -b html -d _build/doctrees -W source _build/html
11191 popd
112-
113- python -c " import pyarrow.parquet"
114- python -c " import pyarrow.plasma"
115-
116- if [ $TRAVIS_OS_NAME == " linux" ]; then
117- export PLASMA_VALGRIND=1
118- fi
119-
120- PYARROW_PATH=$CONDA_PREFIX /lib/python$PYTHON_VERSION /site-packages/pyarrow
121- python -m pytest -vv -r sxX -s $PYARROW_PATH --parquet
122-
123- if [ " $PYTHON_VERSION " == " 3.6" ] && [ $TRAVIS_OS_NAME == " linux" ]; then
124- # Build documentation once
125- pushd $ARROW_PYTHON_DIR /doc
126- conda install -y -q --file=requirements.txt
127- sphinx-build -b html -d _build/doctrees -W source _build/html
128- popd
129- fi
130- }
131-
132- # run tests for python 2.7 and 3.6
133- python_version_tests 2.7
134- python_version_tests 3.6
92+ fi
0 commit comments