diff --git a/.travis.yml b/.travis.yml index 72ff11a..a4bd9ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,12 @@ compiler: gcc addons: apt: sources: + - deadsnakes - ubuntu-toolchain-r-test packages: - gcc-7 - cppcheck + - python3.6 script: - export CC=gcc-7 - make test diff --git a/Makefile b/Makefile index 99beef4..573c154 100644 --- a/Makefile +++ b/Makefile @@ -69,22 +69,25 @@ uECC.o: ./crypto/micro-ecc/uECC.c env2: virtualenv --python=python2.7 env2 - env2/bin/pip install --upgrade -r tools/requirements.txt + env3/bin/pip --version + env2/bin/pip install -r tools/requirements.txt env3: - python3 -m venv env3 - env3/bin/pip install --upgrade -r tools/requirements.txt - env3/bin/pip install --upgrade black + # black requires >=py3.6 + virtualenv --python=python3.6 env3 + env3/bin/pip --version + env3/bin/pip install -r tools/requirements.txt + env3/bin/pip install black +.PHONY: black blackcheck wink2 wink3 fido2-test cppcheck test clean # selectively reformat our own code -black: env3 - env3/bin/black --skip-string-normalization tools/ -wink2: env2 - env2/bin/python tools/solotool.py solo --wink +blackcheck: export BLACK_CHECK_FLAG := --check +black blackcheck: env3 + env3/bin/black --skip-string-normalization $(BLACK_CHECK_FLAG) tools/ -wink3: env3 - env3/bin/python tools/solotool.py solo --wink +wink2 wink3: wink% : env% + $