mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 01:18:28 +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
|
#!/bin/bash
|
||||||
CURDIR=$(pwd)
|
CURDIR=$(pwd)
|
||||||
|
mkdir -p $CURDIR/pb2/
|
||||||
|
echo > $CURDIR/pb2/__init__.py
|
||||||
|
|
||||||
INDEX=../src/trezor/messages/wire_types.py
|
INDEX=../src/trezor/messages/wire_types.py
|
||||||
rm -f $INDEX
|
rm -f $INDEX
|
||||||
@ -8,8 +10,12 @@ for i in types messages storage ; do
|
|||||||
# Compile .proto files to python2 modules using google protobuf library
|
# Compile .proto files to python2 modules using google protobuf library
|
||||||
cd $CURDIR/../../trezor-common/protob
|
cd $CURDIR/../../trezor-common/protob
|
||||||
protoc --python_out=$CURDIR/pb2/ -I/usr/include -I. $i.proto
|
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
|
# Convert google protobuf library to trezor's internal format
|
||||||
cd $CURDIR
|
cd $CURDIR
|
||||||
./pb2py $i ../src/trezor/messages/ $INDEX
|
./pb2py $i ../src/trezor/messages/ $INDEX
|
||||||
done
|
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