Skip to content

Commit

Permalink
Proper cross-compilation with setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
nshmyrev committed Jun 1, 2020
1 parent 75993ea commit f4f920f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions travis/build-wheels-dockcross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@ for pyver in 3.6 3.7; do
export KALDI_ROOT=/opt/kaldi
export PATH=/opt/python/cp${pyver}-cp${pyver}m/bin:$ORIG_PATH
export VOSK_SOURCE=/io/src
echo $CROSS_TRIPLE
case $CROSS_TRIPLE in
*arm-*)
export _PYTHON_HOST_PLATFORM=linux-armv6l
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_arm-linux-gnueabihf
;;
*armv7-*)
export _PYTHON_HOST_PLATFORM=linux-armv7l
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_arm-linux-gnueabihf
;;
*aarch64-*)
export _PYTHON_HOST_PLATFORM=linux-aarch64
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_aarch64-linux-gnu
;;
esac
export PYTHONHOME=$CROSS_ROOT
export PYTHONPATH=/opt/python/cp${pyver}-cp${pyver}m/lib/python${pyver}/site-packages:/opt/python/cp${pyver}-cp${pyver}m/lib/python${pyver}/lib-dynload

pip3 -v wheel /io/python -w /io/wheelhouse
rm -rf /io/python/build
pip${pyver} -v wheel /io/python -w /io/wheelhouse

done
1 change: 1 addition & 0 deletions travis/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export KALDI_ROOT=/opt/kaldi
for pypath in /opt/python/cp3[56789]*; do
export VOSK_SOURCE=/io/src
mkdir -p /opt/wheelhouse
rm -rf /io/python/build
"${pypath}/bin/pip" -v wheel /io/python -w /opt/wheelhouse
done

Expand Down

0 comments on commit f4f920f

Please sign in to comment.