10000 Fix Dockerifle · matrix-io/python-for-android@7e5e64a · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e5e64a

Browse files
committed
Fix Dockerifle
1 parent 5e27d29 commit 7e5e64a

File tree

1 file changed

+15
-36
lines changed

1 file changed

+15
-36
lines changed

pythonforandroid/recipes/grpc/Dockerfile

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -286,54 +286,32 @@ RUN mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" \
286286
&& 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
287287

288288
# Python and user packages
289-
290289
ENV USER="user"
291290
ENV HOME_DIR="/home/${USER}"
292291
ENV WORK_DIR="${HOME_DIR}" \
293292
PATH="${HOME_DIR}/.local/bin:${PATH}"
294293

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-
317294
# install system dependencies
318295
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
321299

322300
# build dependencies
323301
# https://buildozer.readthedocs.io/en/latest/installation.html#android-on-ubuntu-16-04-64bit
324302
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 \
328306
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
332310

333311
# specific recipes dependencies (e.g. libffi requires autoreconf binary)
334312
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 \
337315
&& apt -y clean
338316

339317
# prepare non root env
@@ -344,8 +322,8 @@ RUN usermod -append --groups sudo ${USER}
344322
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
345323

346324

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
349327

350328
WORKDIR ${WORK_DIR}
351329
COPY --chown=user:user . ${WORK_DIR}
@@ -355,4 +333,5 @@ USER ${USER}
355333
# install python-for-android from current branch
356334
RUN virtualenv --python=python3 venv \
357335
&& . venv/bin/activate \
358-
&& pip install -e .
336+
&& pip3 install --upgrade cython==0.28.3 \
337+
&& pip3 install -e .

0 commit comments

Comments
 (0)
0