'pyarrow dependency custom build wheel
I am developing a python package using pybind11 which depends on pyarrow to interop between data types in python and C++. Therefore I build apache-arrow with the following script:
#!/bin/bash
set -e
VERSION=6.0.0
VERSIONSTR=${VERSION//./_}
ARROW_DIR=arrow-apache-arrow-${VERSION}
ARROW_TGZ=apache-arrow-${VERSION}.tar.gz
INSTALLATIONFOLDER=/opt/arrow_${VERSIONSTR}
BUILDFOLDER=build_arrow_${VERSION}
if [ ! -f ${ARROW_DIR} ]; then
if [ ! -f ${ARROW_TGZ} ]; then
wget https://github.com/apache/arrow/archive/refs/tags/${ARROW_TGZ}
fi
tar xf ${ARROW_TGZ}
fi
mkdir -p ${BUILDFOLDER}
cd ${BUILDFOLDER}
cmake -DBUILD_TYPE=Release -DARROW_SIMD_LEVEL=AVX512 -DARROW_PYTHON=ON -DCMAKE_INSTALL_PREFIX=${INSTALLATIONFOLDER} ../${ARROW_DIR}/cpp
make -j 12
sudo make install
cd ../${ARROW_DIR}/python
PYARROW_CMAKE_OPTIONS="-DARROW_HOME=${INSTALLATIONFOLDER}" python setup.py build_ext --build-type=release --bundle-arrow-cpp bdist_wheel
which installs apache-arrow and creates the wheel file pyarrow-6.0.0-cp39-cp39-linux_x86_64.whl.
With this wheel file installed I can develop my package and all is ok. But how I can deploy a binary wheel for my package?
How can I ensure that the consumer has installed the same pyarrow wheel package?
Do I break other packages which depends on the pypi version of pyarrow? If I want that mypackage.whl is compatible with pypi's verison of pyarrow do I have to build it with some manylinux image?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
