Skip to content

Apache DataFusion SQL Query Engine

ARROW-5856: [Python] [Packaging] Fix use of C++ / Cython API from wheels

Antoine Pitrouc83290d7054f
diff --git a/dev/tasks/python-wheels/manylinux-test.sh b/dev/tasks/python-wheels/manylinux-test.sh
index 8ed2efef5d..a0735f3d2d 100755
--- a/dev/tasks/python-wheels/manylinux-test.sh
+++ b/dev/tasks/python-wheels/manylinux-test.sh
@@ -27,7 +27,7 @@ pip install -q /arrow/python/$WHEEL_TAG/dist/*.whl
# Install test dependencies (pip won't work after removing system zlib)
pip install -q -r /arrow/python/requirements-test.txt
# Run pyarrow tests
-pytest -v --pyargs pyarrow
+pytest -rs --pyargs pyarrow
if [[ "$1" == "--remove-system-libs" ]]; then
# Run import tests after removing the bundled dependencies from the system
diff --git a/dev/tasks/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.sh
index 415f08d0ca..c1d001d558 100755
--- a/dev/tasks/python-wheels/osx-build.sh
+++ b/dev/tasks/python-wheels/osx-build.sh
@@ -183,14 +183,19 @@ function install_wheel {
pip install $(pip_opts) \
$(python $multibuild_dir/supported_wheels.py $wheelhouse/*.whl)
- # Install test dependencies
- pip install $(pip_opts) -r python/requirements-test.txt
popd
}
function run_unit_tests {
+ pushd $1
+
+ # Install test dependencies
+ pip install $(pip_opts) -r python/requirements-test.txt
+
# Run pyarrow tests
- py.test --pyargs pyarrow
+ pytest -rs --pyargs pyarrow
+
+ popd
}
function run_import_tests {
diff --git a/dev/tasks/python-wheels/travis.osx.yml b/dev/tasks/python-wheels/travis.osx.yml
index 6c6b177ee3..8502642661 100644
--- a/dev/tasks/python-wheels/travis.osx.yml
+++ b/dev/tasks/python-wheels/travis.osx.yml
@@ -72,7 +72,7 @@ install:
# install the built wheel and test dependencies
- install_wheel arrow
# run unit tests before removing the system libraries
- - run_unit_tests
+ - run_unit_tests arrow
# remove libz to ensure that it is properly bundled
- sudo find /usr -name libz.* -delete
# run the import tests
diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat
index f5caac04f9..dbb4e47f4f 100644
--- a/dev/tasks/python-wheels/win-build.bat
+++ b/dev/tasks/python-wheels/win-build.bat
@@ -80,7 +80,7 @@ set ARROW_TEST_DATA=%ARROW_SRC%\testing\data
@rem test the wheel
@rem TODO For maximum reliability, we should test in a plain virtualenv instead.
call conda create -n wheel-test -q -y python=%PYTHON_VERSION% ^
- numpy=%NUMPY_VERSION% pandas pytest hypothesis || exit /B
+ numpy=%NUMPY_VERSION% pandas cython pytest hypothesis || exit /B
call activate wheel-test
@rem install the built wheel
@@ -90,4 +90,4 @@ pip install -vv --no-index --find-links=%ARROW_SRC%\python\dist\ pyarrow || exit
python -c "import pyarrow; import pyarrow.parquet; import pyarrow.flight; import pyarrow.gandiva;" || exit /B
@rem run the python tests
-pytest --pyargs pyarrow || exit /B
+pytest -rs --pyargs pyarrow || exit /B
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 370560bf99..f0c6d22cdd 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -180,7 +180,7 @@ tasks:
unicode_width: 32
wheel_tag: manylinux1
test_docker_images:
- - python:2.7-slim # debian ucs4
+ - python:2.7 # debian ucs4
test_remove_system_libs: false
artifacts:
- pyarrow-{no_rc_version}-cp27-cp27mu-manylinux1_x86_64.whl
@@ -194,7 +194,7 @@ tasks:
unicode_width: 16
wheel_tag: manylinux1
test_docker_images:
- - python:3.5-slim
+ - python:3.5
test_remove_system_libs: true
artifacts:
- pyarrow-{no_rc_version}-cp35-cp35m-manylinux1_x86_64.whl
@@ -208,7 +208,7 @@ tasks:
unicode_width: 16
wheel_tag: manylinux1
test_docker_images:
- - python:3.6-slim
+ - python:3.6
test_remove_system_libs: true
artifacts:
- pyarrow-{no_rc_version}-cp36-cp36m-manylinux1_x86_64.whl
@@ -222,7 +222,7 @@ tasks:
unicode_width: 16
wheel_tag: manylinux1
test_docker_images:
- - python:3.7-slim
+ - python:3.7
test_remove_system_libs: true
artifacts:
- pyarrow-{no_rc_version}-cp37-cp37m-manylinux1_x86_64.whl
@@ -249,7 +249,7 @@ tasks:
unicode_width: 32
wheel_tag: manylinux2010
test_docker_images:
- - python:2.7-slim # debian ucs4
+ - python:2.7 # debian ucs4
test_remove_system_libs: false
artifacts:
- pyarrow-{no_rc_version}-cp27-cp27mu-manylinux2010_x86_64.whl
@@ -263,7 +263,7 @@ tasks:
unicode_width: 16
wheel_tag: manylinux2010
test_docker_images:
- - python:3.5-slim
+ - python:3.5
test_remove_system_libs: true
artifacts:
- pyarrow-{no_rc_version}-cp35-cp35m-manylinux2010_x86_64.whl
@@ -277,7 +277,7 @@ tasks:
unicode_width: 16
wheel_tag: manylinux2010
test_docker_images:
- - python:3.6-slim
+ - python:3.6
test_remove_system_libs: true
artifacts:
- pyarrow-{no_rc_version}-cp36-cp36m-manylinux2010_x86_64.whl
@@ -291,7 +291,7 @@ tasks:
unicode_width: 16
wheel_tag: manylinux2010
test_docker_images:
- - python:3.7-slim
+ - python:3.7
test_remove_system_libs: true
artifacts:
- pyarrow-{no_rc_version}-cp37-cp37m-manylinux2010_x86_64.whl