Skip to content

Commit

Permalink
Merge branch 'release/v20200524'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMiras committed May 25, 2020
2 parents 0266106 + e87986e commit 0ae447e
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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/

Expand Down
8 changes: 4 additions & 4 deletions buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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 =
Expand Down
25 changes: 13 additions & 12 deletions dockerfiles/Dockerfile-android
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,53 @@
# 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" \
LANGUAGE="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}
Expand All @@ -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
Expand Down
13 changes: 7 additions & 6 deletions dockerfiles/Dockerfile-linux
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand All @@ -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/*
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [v20200524]

- Bumps dependencies
- Infura API key is now mandatory, fixes #158

## [v20191228]

- Bump to API level 28 as required by Play Store
Expand Down
5 changes: 3 additions & 2 deletions src/pywalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from web3 import HTTPProvider, Web3

ETHERSCAN_API_KEY = "R796P9T31MEA24P8FNDZBCA88UHW8YCNVW"
INFURA_PROJECT_ID = "529cca6c4c9d4dfb99464c92f4a25689"
ROUND_DIGITS = 3
KEYSTORE_DIR_PREFIX = expanduser("~")
# default pyethapp keystore path
Expand Down Expand Up @@ -45,9 +46,9 @@ class HTTPProviderFactory:

PROVIDER_URLS = {
# ChainID.MAINNET: 'https://api.myetherapi.com/eth',
ChainID.MAINNET: 'https://mainnet.infura.io',
ChainID.MAINNET: f"https://mainnet.infura.io/v3/{INFURA_PROJECT_ID}",
# ChainID.ROPSTEN: 'https://api.myetherapi.com/rop',
ChainID.ROPSTEN: 'https://ropsten.infura.io',
ChainID.ROPSTEN: f"https://ropsten.infura.io/v3/{INFURA_PROJECT_ID}",
}

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2019.1228'
__version__ = '2020.0524'
4 changes: 4 additions & 0 deletions src/websockets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""
Dummy module so we don't need to install websockets package.
This is being used by the web3 module.
"""

0 comments on commit 0ae447e

Please sign in to comment.