@@ -286,54 +286,32 @@ RUN mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" \
286
286
&& ln -sf /opt/android/android-ndk/platforms/android-21/arch-arm/usr/lib/libc.so /opt/android/android-ndk/platforms/android-21/arch-arm/usr/lib/librt.so
287
287
288
288
# Python and user packages
289
-
290
289
ENV USER="user"
291
290
ENV HOME_DIR="/home/${USER}"
292
291
ENV WORK_DIR="${HOME_DIR}" \
293
292
PATH="${HOME_DIR}/.local/bin:${PATH}"
294
293
295
- # Install python 3.7 dependencies
296
- RUN ${RETRY} apt -y install -qq --no-install-recommends \
297
- build-essential zlib1g-dev \
298
- libncurses5-dev libgdbm-dev \
299
- libnss3-dev libssl-dev \
300
- libreadline-dev libffi-dev wget \
301
- && apt -y autoremove
302
-
303
- # Install python 3.7
304
- RUN wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz \
305
- && tar -xf Python-3.7.3.tar.xz && cd Python-3.7.3 \
306
- && ./configure --enable-optimizations \
307
- && make -j "${N_JOBS}" \
308
- && make altinstall
309
-
310
- RUN python3.7 --version
311
- RUN pip --version
312
-
313
- # Install virtualenv
314
- RUN pip install --upgrade virtualenv
315
-
316
-
317
294
# install system dependencies
318
295
RUN ${RETRY} apt -y install -qq --no-install-recommends \
319
- wget lbzip2 patch sudo \
320
- && apt -y autoremove
296
+ python3 virtualenv python3-pip python3-venv \
297
+ wget lbzip2 patch sudo \
298
+ && apt -y autoremove
321
299
322
300
# build dependencies
323
301
# https://buildozer.readthedocs.io/en/latest/installation.html#android-on-ubuntu-16-04-64bit
324
302
RUN dpkg --add-architecture i386 \
325
- && ${RETRY} apt -y update -qq \
326
- && ${RETRY} apt -y install -qq --no-install-recommends \
327
- build-essential ccache git \
303
+ && ${RETRY} apt -y update -qq \
304
+ && ${RETRY} apt -y install -qq --no-install-recommends \
305
+ build-essential ccache git python3 python3-dev \
328
306
libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 \
329
- libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 \
330
- zip zlib1g-dev zlib1g:i386 \
331
- && apt -y autoremove
307
+ libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 \
308
+ zip zlib1g-dev zlib1g:i386 \
309
+ && apt -y autoremove
332
310
333
311
# specific recipes dependencies (e.g. libffi requires autoreconf binary)
334
312
RUN ${RETRY} apt -y install -qq --no-install-recommends \
335
- libffi-dev autoconf automake cmake gettext libltdl-dev libtool pkg-config \
336
- && apt -y autoremove \
313
+ libffi-dev autoconf automake cmake gettext libltdl-dev libtool pkg-config \
314
+ && apt -y autoremove \
337
315
&& apt -y clean
338
316
339
317
# prepare non root env
@@ -344,8 +322,8 @@ RUN usermod -append --groups sudo ${USER}
344
322
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
345
323
346
324
347
- RUN pip install --upgrade --ignore-installed setuptools
348
- RUN pip install --upgrade cython==0.28.3
325
+ RUN pip3 install --upgrade cython==0.28.3
326
+ RUN pip3 install --upgrade --ignore-installed setuptools
349
327
350
328
WORKDIR ${WORK_DIR}
351
329
COPY --chown=user:user . ${WORK_DIR}
@@ -355,4 +333,5 @@ USER ${USER}
355
333
# install python-for-android from current branch
356
334
RUN virtualenv --python=python3 venv \
357
335
&& . venv/bin/activate \
358
- && pip install -e .
336
+ && pip3 install --upgrade cython==0.28.3 \
337
+ && pip3 install -e .
0 commit comments