diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh index 14d66b44ff8ee..af6b0085724fc 100755 --- a/ci/travis_script_python.sh +++ b/ci/travis_script_python.sh @@ -26,29 +26,34 @@ export PATH="$MINICONDA/bin:$PATH" conda update -y -q conda conda info -a -PYTHON_VERSION=3.5 -CONDA_ENV_NAME=pyarrow-test +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 create -y -q -n $CONDA_ENV_NAME python=$PYTHON_VERSION -source activate $CONDA_ENV_NAME + python --version + which python -python --version -which python + # faster builds, please + conda install -y nomkl -# faster builds, please -conda install -y nomkl + # Expensive dependencies install from Continuum package repo + conda install -y pip numpy pandas cython -# Expensive dependencies install from Continuum package repo -conda install -y pip numpy pandas cython + # Other stuff pip install + pip install -r requirements.txt -# Other stuff pip install -pip install -r requirements.txt + export ARROW_HOME=$ARROW_CPP_INSTALL -export ARROW_HOME=$ARROW_CPP_INSTALL + python setup.py build_ext --inplace -python setup.py build_ext --inplace + py.test -vv -r sxX pyarrow +} -py.test -vv -r sxX pyarrow +# run tests for python 2.7 and 3.5 +python_version_tests 2.7 +python_version_tests 3.5 # if [ $TRAVIS_OS_NAME == "linux" ]; then # valgrind --tool=memcheck py.test -vv -r sxX arrow diff --git a/python/src/pyarrow/common.h b/python/src/pyarrow/common.h index a43e4d28c899a..db6361384c10d 100644 --- a/python/src/pyarrow/common.h +++ b/python/src/pyarrow/common.h @@ -24,7 +24,7 @@ namespace arrow { class MemoryPool; } namespace pyarrow { -#define PYARROW_IS_PY2 PY_MAJOR_VERSION < 2 +#define PYARROW_IS_PY2 PY_MAJOR_VERSION <= 2 #define RETURN_ARROW_NOT_OK(s) do { \ arrow::Status _s = (s); \