Skip to content

Apache DataFusion SQL Query Engine

ARROW-4637: [Python] Conditionally import pandas symbols if they are used. Do not require pandas as a test dependency

Wes McKinney639fca931cf4
diff --git a/ci/travis_script_manylinux.sh b/ci/travis_script_manylinux.sh
index fe6c10806f..6fbaa0f8f5 100755
--- a/ci/travis_script_manylinux.sh
+++ b/ci/travis_script_manylinux.sh
@@ -59,10 +59,9 @@ for PYTHON_TUPLE in ${PYTHON_VERSIONS}; do
conda activate $CONDA_ENV_DIR
# install the produced wheels
- pip install tensorflow
pip install dist/*.whl
- # Test optional dependencies and the presence of tensorflow
+ # Test optional dependencies
python check_imports.py
# Install test dependencies and run pyarrow tests
diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh
index 5e4aaac052..1e049c4c2f 100755
--- a/ci/travis_script_python.sh
+++ b/ci/travis_script_python.sh
@@ -166,6 +166,9 @@ python -c "import pyarrow.parquet"
python -c "import pyarrow.plasma"
python -c "import pyarrow.orc"
+# Ensure we do eagerly import pandas (or other expensive imports)
+python < scripts/test_imports.py
+
echo "PLASMA_VALGRIND: $PLASMA_VALGRIND"
# Set up huge pages for plasma test