1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-16 04:29:08 +00:00
Commit Graph

3 Commits

Author SHA1 Message Date
matejcik
1b9b7d6c8e pb2py: properly handle nested messages and enums 2018-07-04 17:08:09 +02:00
matejcik
6575418de9 pb2py: smarter protobuf include handling
support PROTOC_INCLUDE env variable (fixes #158)
support multiple `-I` arguments
smarter detection of `protoc` presence and its include dirs
2018-07-03 15:31:49 +02:00
matejcik
c4420e41d3 protob: add a smart pb2py builder
Now we don't need build_protobuf anymore and this is usable
by both core and python-trezor
(as well as generating custom protobufs from other sources)

We still need protoc, unfortunately, but pb2py now calls it
by itself. (little more robustly; instead of generated
python classes, it uses the FileDescriptorSet output which
is parsable by a built-in protobuf class)

To support the script, messages.proto and types.proto must
set a common package. Also there is currently no support for
compiling more than one proto file, we depend on the fact
that messages.proto import types.proto.
(if this is needed, it should be relatively simple to add,
simply pass more than one file to the embedded protoc call)
2018-07-02 18:37:56 +02:00