--- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -35,48 +35,33 @@ prepare() { build() { cd apache-${_pkg}-${pkgver}/python - ARROW_HOME=/usr \ - PARQUET_HOME=/usr \ + # https://github.com/apache/arrow/blob/main/docs/source/developers/python.rst#relevant-components-and-environment-variables PYARROW_BUNDLE_ARROW_CPP_HEADERS=0 \ PYARROW_BUNDLE_PLASMA_EXECUTABLE=0 \ - PYARROW_WITH_HDFS=1 \ - PYARROW_WITH_FLIGHT=1 \ PYARROW_WITH_DATASET=1 \ + PYARROW_WITH_FLIGHT=1 \ + PYARROW_WITH_HDFS=1 \ + PYARROW_WITH_ORC=1 \ PYARROW_WITH_PARQUET=1 \ + PYARROW_WITH_PARQUET_ENCRYPTION=1 \ PYARROW_WITH_PLASMA=1 \ - PYARROW_WITH_TENSORFLOW=1 \ - PYARROW_WITH_ORC=1 \ PYARROW_WITH_SUBSTRAIT=1 \ - PYARROW_WITH_PARQUET_ENCRYPTION=1 \ + PYARROW_WITH_TENSORFLOW=1 \ python -m build --wheel --no-isolation } check() { - cd apache-${_pkg}-${pkgver}/python - local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))') - # rename source to avoid name clash - mv pyarrow _nopyarrow - PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-cpython-${python_version/./}" \ + # local install for testing + mkdir -p fakeinstall + bsdtar -C fakeinstall -xf apache-${_pkg}-${pkgver}/python/dist/*.whl + + PYTHONPATH="${srcdir}/fakeinstall" \ ARROW_TEST_DATA="${srcdir}"/arrow-testing/data \ - ARROW_HOME=/usr \ - PARQUET_HOME=/usr \ - pytest -vv --color=yes -k 'not test_cython_api and not test_visit_strings and not test_env_var and not test_get_include' - mv _nopyarrow pyarrow + pytest -vv --color=yes -k 'not test_cython_api and not test_visit_strings and not test_env_var and not test_get_include' --pyargs pyarrow } package(){ cd apache-${_pkg}-${pkgver}/python - ARROW_HOME=/usr \ - PARQUET_HOME=/usr \ - PYARROW_BUNDLE_ARROW_CPP_HEADERS=0 \ - PYARROW_BUNDLE_PLASMA_EXECUTABLE=0 \ - PYARROW_WITH_HDFS=1 \ - PYARROW_WITH_FLIGHT=1 \ - PYARROW_WITH_DATASET=1 \ - PYARROW_WITH_PARQUET=1 \ - PYARROW_WITH_PLASMA=1 \ - PYARROW_WITH_TENSORFLOW=1 \ - PYARROW_WITH_ORC=1 \ python -m installer --destdir="${pkgdir}" dist/*.whl # drop tests from install