mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 10:58:21 +00:00
remove the need for pb2 subdir for pb2py generator
This commit is contained in:
parent
18c2066d83
commit
a1b75b879d
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
CURDIR=$(pwd)
|
||||
mkdir -p $CURDIR/pb2/
|
||||
echo > $CURDIR/pb2/__init__.py
|
||||
|
||||
INDEX=../src/trezor/messages/wire_types.py
|
||||
rm -f $INDEX
|
||||
@ -8,8 +10,12 @@ for i in types messages storage ; do
|
||||
# Compile .proto files to python2 modules using google protobuf library
|
||||
cd $CURDIR/../../trezor-common/protob
|
||||
protoc --python_out=$CURDIR/pb2/ -I/usr/include -I. $i.proto
|
||||
done
|
||||
|
||||
for i in types messages storage ; do
|
||||
# Convert google protobuf library to trezor's internal format
|
||||
cd $CURDIR
|
||||
./pb2py $i ../src/trezor/messages/ $INDEX
|
||||
done
|
||||
|
||||
rm -rf $CURDIR/pb2/
|
||||
|
2
tools/pb2/.gitignore
vendored
2
tools/pb2/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*_pb2.py
|
||||
*.pyc
|
Loading…
Reference in New Issue
Block a user