diff --git a/Makefile b/Makefile index ad470a7..4ce365a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VIRTUAL_ENV ?= venv ACTIVATE_PATH=$(VIRTUAL_ENV)/bin/activate PIP=$(VIRTUAL_ENV)/bin/pip PYTHON_MAJOR_VERSION=3 -PYTHON_MINOR_VERSION=7 +PYTHON_MINOR_VERSION=8 PYTHON_VERSION=$(PYTHON_MAJOR_VERSION).$(PYTHON_MINOR_VERSION) PYTHON_MAJOR_MINOR=$(PYTHON_MAJOR_VERSION)$(PYTHON_MINOR_VERSION) PYTHON_WITH_VERSION=python$(PYTHON_VERSION) @@ -77,7 +77,7 @@ pytest: virtualenv test: pytest lint @if test -n "$$CI"; then make uitest; fi; \ -uitest: +uitest: virtualenv . $(ACTIVATE_PATH) && \ $(PYTHON) -m kivyunittest --folder src/tests/ui/ --pythonpath src/ diff --git a/buildozer.spec b/buildozer.spec index 64c89ee..0dd5c50 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -41,7 +41,7 @@ requirements = android, attrdict==2.0.0, certifi==2018.10.15, - cffi==1.11.5, + cffi==1.13.2, chardet==3.0.4, cytoolz==0.9.0, eth-abi==2.0.0, @@ -55,7 +55,7 @@ requirements = eth-typing==2.0.0, hexbytes==0.1.0, idna==2.7, - Kivy==1.11.1, + Kivy==58e70b1, kivy-garden.kivymd==2019.910, kivy-garden.qrcode==2019.914, kivy-garden.xcamera==2019.928, @@ -65,7 +65,7 @@ requirements = lru-dict==1.1.5, openssl, parsimonious==0.8.1, - Pillow==5.2.0, + Pillow==7.0.0, pycryptodome==3.4.6, python3, pyzbar==0.1.8, @@ -243,7 +243,7 @@ android.arch = armeabi-v7a p4a.fork = kivy # (str) python-for-android branch to use, defaults to master -p4a.branch = v2019.10.06 +p4a.branch = v2020.04.29 # (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) #p4a.source_dir = diff --git a/dockerfiles/Dockerfile-android b/dockerfiles/Dockerfile-android index dcd22b1..5edabdc 100644 --- a/dockerfiles/Dockerfile-android +++ b/dockerfiles/Dockerfile-android @@ -7,20 +7,18 @@ # docker run pywallet-android 'buildozer android debug' # Or for interactive shell: # docker run -it --rm pywallet-android -FROM ubuntu:18.04 +FROM ubuntu:20.04 ARG TRAVIS=false ENV USER="user" ENV HOME_DIR="/home/${USER}" ENV WORK_DIR="${HOME_DIR}" \ PATH="${HOME_DIR}/.local/bin:${PATH}" -ENV DOCKERFILES_VERSION="develop" \ - DOCKERFILES_URL="https://raw.githubusercontent.com/AndreMiras/dockerfiles" -ENV MAKEFILES_URL="${DOCKERFILES_URL}/${DOCKERFILES_VERSION}/buildozer_android" # configure locale -RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \ +RUN apt update -qq > /dev/null \ + && DEBIAN_FRONTEND=noninteractive apt install -qq --yes --no-install-recommends \ locales && \ locale-gen en_US.UTF-8 ENV LANG="en_US.UTF-8" \ @@ -28,30 +26,34 @@ ENV LANG="en_US.UTF-8" \ LC_ALL="en_US.UTF-8" # install build dependencies (required to successfully build the project) -RUN apt install -qq --yes --no-install-recommends \ +RUN apt update -qq > /dev/null \ + && DEBIAN_FRONTEND=noninteractiv apt install -qq --yes --no-install-recommends \ autoconf \ automake \ ca-certificates \ cmake \ curl \ gettext \ + git \ libffi-dev \ + libssl-dev \ libltdl-dev \ - libpython2.7-dev \ - libpython3.6-dev \ + libpython3.8-dev \ libtool \ make \ openjdk-8-jdk \ + patch \ pkg-config \ python3-setuptools \ - python3.6 \ + python3.8 \ python3-pip \ python3-setuptools \ python \ sudo \ unzip \ xz-utils \ - zip + zip \ + zlib1g-dev # prepare non root env RUN useradd --create-home --shell /bin/bash ${USER} @@ -63,8 +65,7 @@ USER ${USER} WORKDIR ${WORK_DIR} # install buildozer and dependencies -RUN curl --location --progress-bar ${MAKEFILES_URL}/buildozer.mk --output buildozer.mk -RUN make -f buildozer.mk +RUN pip3 install --user --upgrade buildozer Cython==0.28.6 COPY . ${WORK_DIR} # limits the amount of logs for Travis diff --git a/dockerfiles/Dockerfile-linux b/dockerfiles/Dockerfile-linux index 5539ddc..b1cee43 100644 --- a/dockerfiles/Dockerfile-linux +++ b/dockerfiles/Dockerfile-linux @@ -5,17 +5,17 @@ # docker run pywallet-linux 'make test' # Or for interactive shell: # docker run -it --rm pywallet-linux -# TODO: -# - delete archives to keep small the container small -# - setup caching (for apt, and pip) -FROM ubuntu:18.04 +# You may need to allow X Server access: +# xhost +si:localuser:$USER +FROM ubuntu:20.04 ENV USER="user" ENV HOME_DIR="/home/${USER}" ENV WORK_DIR="${HOME_DIR}/app" # configure locale -RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \ +RUN apt update -qq > /dev/null \ + && DEBIAN_FRONTEND=noninteractive apt install -qq --yes --no-install-recommends \ locales && \ locale-gen en_US.UTF-8 && \ rm -rf /var/lib/apt/lists/* @@ -24,7 +24,8 @@ ENV LANG="en_US.UTF-8" \ LC_ALL="en_US.UTF-8" # install minimal system dependencies -RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \ +RUN apt update -qq > /dev/null \ + && DEBIAN_FRONTEND=noninteractive apt install -qq --yes --no-install-recommends \ make \ sudo \ && rm -rf /var/lib/apt/lists/* diff --git a/requirements.txt b/requirements.txt index c12fe8f..1d97ff6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,16 @@ coverage==4.4.1 -flake8==3.3.0 +flake8==3.8.2 isort==4.2.5 kivyunittest==0.1.8 eth-accounts==20191227 eth-hash==0.1.1 eth-utils==1.4.1 -Kivy==1.11.1 +Kivy==2.0.0rc2 kivy-garden.kivymd==2019.910 kivy-garden.qrcode==2019.914 kivy-garden.zbarcam==2019.1020 layoutmargin==20190911 -Pillow==5.2.0 +Pillow==7.0.0 qrcode==5.3 raven==6.1.0 web3==5.2.0 diff --git a/src/websockets.py b/src/websockets.py new file mode 100644 index 0000000..de97bf0 --- /dev/null +++ b/src/websockets.py @@ -0,0 +1,4 @@ +""" +Dummy module so we don't need to install websockets package. +This is being used by the web3 module. +"""