electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit ca931f476fc20e0c2003d4eb4fcafceb85e3972e
parent 43487910c7bd4868f3fd43054dd36a2dee5d0fc5
Author: SomberNight <somber.night@protonmail.com>
Date:   Sun,  3 Feb 2019 23:40:49 +0100

fix android build: pin buildozer and pin kivy.

old p4a did not work with new buildozer. kivy master crashes.
kivy latest release has runtime issues (orientation was landscape).
these versions seem to work.
also updated dockerfile to more closely match p4a master.

Diffstat:
Melectrum/gui/kivy/tools/Dockerfile | 37++++++++++++++++++++++---------------
Melectrum/gui/kivy/tools/buildozer.spec | 2+-
2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/electrum/gui/kivy/tools/Dockerfile b/electrum/gui/kivy/tools/Dockerfile @@ -4,10 +4,17 @@ FROM ubuntu:18.04 ENV ANDROID_HOME="/opt/android" +# configure locale +RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \ + locales && \ + locale-gen en_US.UTF-8 +ENV LANG="en_US.UTF-8" \ + LANGUAGE="en_US.UTF-8" \ + LC_ALL="en_US.UTF-8" + RUN apt -y update -qq \ - && apt -y install -qq --no-install-recommends curl unzip git python3-pip python3-setuptools \ - && apt -y autoremove \ - && apt -y clean + && apt -y install -qq --no-install-recommends curl unzip ca-certificates \ + && apt -y autoremove ENV ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk" @@ -32,6 +39,7 @@ ENV ANDROID_SDK_HOME="${ANDROID_HOME}/android-sdk" # get the latest version from https://developer.android.com/studio/index.html ENV ANDROID_SDK_TOOLS_VERSION="4333796" +ENV ANDROID_SDK_BUILD_TOOLS_VERSION="28.0.3" ENV ANDROID_SDK_TOOLS_ARCHIVE="sdk-tools-linux-${ANDROID_SDK_TOOLS_VERSION}.zip" ENV ANDROID_SDK_TOOLS_DL_URL="https://dl.google.com/android/repository/${ANDROID_SDK_TOOLS_ARCHIVE}" @@ -51,14 +59,13 @@ RUN mkdir --parents "${ANDROID_SDK_HOME}/.android/" \ # accept Android licenses (JDK necessary!) RUN apt -y update -qq \ && apt -y install -qq --no-install-recommends openjdk-8-jdk \ - && apt -y autoremove \ - && apt -y clean -RUN yes | "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" --licenses > /dev/null + && apt -y autoremove +RUN yes | "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;${ANDROID_SDK_BUILD_TOOLS_VERSION}" > /dev/null # download platforms, API, build tools RUN "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "platforms;android-24" > /dev/null && \ "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "platforms;android-28" > /dev/null && \ - "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;28.0.3" > /dev/null && \ + "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "build-tools;${ANDROID_SDK_BUILD_TOOLS_VERSION}" > /dev/null && \ "${ANDROID_SDK_HOME}/tools/bin/sdkmanager" "extras;android;m2repository" > /dev/null && \ chmod +x "${ANDROID_SDK_HOME}/tools/bin/avdmanager" @@ -71,8 +78,9 @@ ENV WORK_DIR="${HOME_DIR}/wspace" \ # install system dependencies RUN apt -y update -qq \ && apt -y install -qq --no-install-recommends \ - python virtualenv python-pip wget lbzip2 patch sudo \ - software-properties-common + python3 virtualenv python3-pip python3-setuptools git wget lbzip2 patch sudo \ + software-properties-common \ + && apt -y autoremove # install kivy RUN add-apt-repository ppa:kivy-team/kivy \ @@ -87,7 +95,7 @@ RUN python3 -m pip install image RUN dpkg --add-architecture i386 \ && apt -y update -qq \ && apt -y install -qq --no-install-recommends \ - build-essential ccache git python2.7 python2.7-dev \ + build-essential ccache git python3 python3-dev \ libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 \ libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 \ zip zlib1g-dev zlib1g:i386 \ @@ -97,8 +105,7 @@ RUN dpkg --add-architecture i386 \ # specific recipes dependencies (e.g. libffi requires autoreconf binary) RUN apt -y update -qq \ && apt -y install -qq --no-install-recommends \ - autoconf automake cmake gettext libltdl-dev libtool pkg-config \ - python3.7 \ + libffi-dev autoconf automake cmake gettext libltdl-dev libtool pkg-config \ && apt -y autoremove \ && apt -y clean @@ -119,8 +126,7 @@ RUN chown ${USER} /opt USER ${USER} -RUN pip install --upgrade cython==0.29 -RUN python3 -m pip install --upgrade cython==0.29 +RUN python3 -m pip install --upgrade cython==0.28.6 # prepare git RUN git config --global user.name "John Doe" \ @@ -130,6 +136,7 @@ RUN git config --global user.name "John Doe" \ RUN cd /opt \ && git clone https://github.com/kivy/buildozer \ && cd buildozer \ + && git checkout 88e4a4b0c7733eec1d14c00579ec412fb59ad7f2 \ && python3 -m pip install -e . # install python-for-android @@ -138,7 +145,7 @@ RUN cd /opt \ && cd python-for-android \ && git remote add sombernight https://github.com/SomberNight/python-for-android \ && git fetch --all \ - && git checkout fad5dd2fdc9b116b7621470deac501e4a7c4cc11 \ + && git checkout dec1badc3bd134a9a1c69275339423a95d63413e \ # allowBackup="false": && git cherry-pick 86eeec7c19679a5886d5e095ce0a43f1da138f87 \ && python3 -m pip install -e . diff --git a/electrum/gui/kivy/tools/buildozer.spec b/electrum/gui/kivy/tools/buildozer.spec @@ -31,7 +31,7 @@ version.filename = %(source.dir)s/electrum/version.py #version = 1.9.8 # (list) Application requirements -requirements = python3, android, openssl, plyer, kivy==master, libffi, libsecp256k1 +requirements = python3, android, openssl, plyer, kivy==b47f669f44dbda4f463bcb7d2cada639f7fed3bc, libffi, libsecp256k1 # (str) Presplash of the application #presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png