You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wownero/src/device_trezor/trezor/tools
Dusan Klinec 5ea17909ca
device/trezor: debugging features, trezor tests
5 years ago
..
py2backports device/trezor: python2 compatibility - bundle dependencies 6 years ago
README.md device/trezor: python2 compatibility - bundle dependencies 6 years ago
build_protob.py device/trezor: debugging features, trezor tests 5 years ago
pb2cpp.py device/trezor: python2 compatibility - bundle dependencies 6 years ago

README.md

Trezor

Messages rebuild

Install protoc for your distribution. Requirements:

  • protobuf-compiler
  • libprotobuf-dev
  • python

Soft requirement: Python 3, can be easily installed with pyenv. If Python 3 is used there are no additional python dependencies.

Since Cmake 3.12 the FindPython module is used to locate the Python interpreter in your system. It preferably searches for Python 3, if none is found, it searches for Python 2.

Lower version of the cmake uses another module which does not guarantee ordering. If you want to override the selected python you can do it in the following way:

export TREZOR_PYTHON=`which python3`

Python 2.7+

Python 3 has tempfile.TemporaryDirectory available but Python 2 lacks this class so the message generation code uses backports.tempfile package bundled in the repository.

The minimal Python versions are 2.7 and 3.4

Regenerate messages

cd src/device_trezor/trezor
python tools/build_protob.py

The messages regeneration is done also automatically via cmake.