Skip to content

Commit

Permalink
Build dockcross with python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
nshmyrev committed Jun 22, 2020
1 parent b831c9a commit 4333c3c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
17 changes: 17 additions & 0 deletions travis/Dockerfile.dockcross
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ RUN cd /opt \
&& make install \
&& rm -rf /opt/cpython-3.6.10 /opt/cpython-3.6.10-cross /opt/v3.6.10.tar.gz

RUN cd /opt \
&& wget -q https://github.com/python/cpython/archive/v3.8.3.tar.gz \
&& tar xf v3.8.3.tar.gz \
&& cp -r cpython-3.8.3 cpython-3.8.3-cross \
&& cd /opt/cpython-3.8.3 \
&& AR=/usr/bin/ar RANLIB=/usr/bin/ranlib CPP=/usr/bin/cpp CXX=/usr/bin/g++ CC=/usr/bin/gcc ./configure --prefix="/opt/python/cp3.8-cp3.8m" \
&& make -j $(nproc) \
&& make install \
&& /opt/python/cp3.8-cp3.8m/bin/pip3 install -U pip \
&& /opt/python/cp3.8-cp3.8m/bin/pip3 install -U wheel \
&& cd /opt/cpython-3.8.3-cross \
&& export PATH=/opt/python/cp3.8-cp3.8m/bin:$PATH \
&& ./configure --prefix=$CROSS_ROOT --with-openssl=$CROSS_ROOT --host=${CROSS_TRIPLE} --build=x86-linux-gnu --disable-ipv6 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_have_long_long_format=yes \
&& make -j $(nproc) \
&& make install \
&& rm -rf /opt/cpython-3.8.3 /opt/cpython-3.8.3-cross /opt/v3.8.3.tar.gz

ARG OPENBLAS_ARCH=ARMV7
ARG ARM_HARDWARE_OPTS="-mfloat-abi=hard -mfpu=neon"
RUN cd /opt \
Expand Down
15 changes: 11 additions & 4 deletions travis/build-wheels-dockcross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@
set -e -x

ORIG_PATH=$PATH
for pyver in 3.6 3.7; do
for pyver in 3.6 3.7 3.8; do

export KALDI_ROOT=/opt/kaldi
export PATH=/opt/python/cp${pyver}-cp${pyver}m/bin:$ORIG_PATH
export VOSK_SOURCE=/io/src

# Python 3.8 somehow changed syconfig file name
sysconfig_bit="m"
if [ $pyver == "3.8" ]; then
sysconfig_bit=""
fi

case $CROSS_TRIPLE in
*arm-*)
export _PYTHON_HOST_PLATFORM=linux-armv6l
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_arm-linux-gnueabihf
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_${sysconfig_bit}_linux_arm-linux-gnueabihf
;;
*armv7-*)
export _PYTHON_HOST_PLATFORM=linux-armv7l
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_arm-linux-gnueabihf
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_${sysconfig_bit}_linux_arm-linux-gnueabihf
;;
*aarch64-*)
export _PYTHON_HOST_PLATFORM=linux-aarch64
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_aarch64-linux-gnu
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_${sysconfig_bit}_linux_aarch64-linux-gnu
;;
esac
export PYTHONHOME=$CROSS_ROOT
Expand Down

0 comments on commit 4333c3c

Please sign in to comment.