1
0
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:
Pavol Rusnak 2016-10-03 18:16:15 +02:00
parent 18c2066d83
commit a1b75b879d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 6 additions and 2 deletions

View File

@ -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/

View File

@ -1,2 +0,0 @@
*_pb2.py
*.pyc

View File