1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

build: set requirements for proper python 3.3 and 3.4 support, make tox happy

This commit is contained in:
matejcik 2018-07-04 17:40:56 +02:00
parent ed3bdc8111
commit fd39692ec9
3 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
-r requirements.txt -r requirements.txt
-r requirements-optional.txt -r requirements-optional.txt
pytest>=3.5.0 pytest>=3.2.5
mock>=2.0.0 mock>=2.0.0
flake8 flake8
protobuf protobuf

View File

@ -1,3 +1,4 @@
hidapi >= 0.7.99.post20 hidapi >= 0.7.99.post20
rlp >= 0.4.4 rlp == 0.4.4; python_version < '3.5'
rlp >= 0.4.4; python_version >= '3.5'
ethjsonrpc >= 0.3.0 ethjsonrpc >= 0.3.0

10
tox.ini
View File

@ -9,6 +9,14 @@ envlist =
deps = deps =
-rrequirements-dev.txt -rrequirements-dev.txt
commands = commands =
# Generate local files
python setup.py prebuild
# Working in the local directory, try to compile all bytecode
python -m compileall trezorlib/ python -m compileall trezorlib/
python trezorctl --help # From installed version, smoke-test trezorctl
trezorctl --help
# Run non-device-dependent tests
python -m pytest --pyarg trezorlib.tests.unit_tests python -m pytest --pyarg trezorlib.tests.unit_tests
# This whole thing is a hack, as the tests run against the cwd version of
# python-trezor, as opposed to what is installed.
# A better solution would be to put `trezorlib` into `src`. But that's not done yet