1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-22 05:10:56 +00:00

protobuf: don't generate storage protobuf

This commit is contained in:
Pavol Rusnak 2018-01-12 13:06:43 +01:00
parent 8f6b2449be
commit 694bc7ac11
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 2 additions and 27 deletions

View File

@ -13,7 +13,7 @@ echo '# Automatically generated by pb2py' >> $INDEX
echo 'from __future__ import absolute_import' >> $INDEX
echo '' >> $INDEX
for i in types messages storage ; do
for i in types messages ; do
# Compile .proto files to python2 modules using google protobuf library
cd $CURDIR/../../trezor-common/protob
protoc --python_out=$PB2DIR -I/usr/include -I. $i.proto
@ -21,9 +21,8 @@ done
# hack to make output python 3 compatible
sed -i 's/^import types_pb2/from . import types_pb2/g' $CURDIR/pb2/messages_pb2.py
sed -i 's/^import types_pb2/from . import types_pb2/g' $CURDIR/pb2/storage_pb2.py
for i in types messages storage ; do
for i in types messages ; do
# Convert google protobuf library to trezor's internal format
cd $CURDIR
./pb2py -p $CURDIR -l $INDEX $i $OUTDIR

View File

@ -1,23 +0,0 @@
# Automatically generated by pb2py
from __future__ import absolute_import
from .. import protobuf as p
from .HDNodeType import HDNodeType
class Storage(p.MessageType):
FIELDS = {
1: ('version', p.UVarintType, 0), # required
2: ('node', HDNodeType, 0),
3: ('mnemonic', p.UnicodeType, 0),
4: ('passphrase_protection', p.BoolType, 0),
5: ('pin_failed_attempts', p.UVarintType, 0),
6: ('pin', p.UnicodeType, 0),
7: ('language', p.UnicodeType, 0),
8: ('label', p.UnicodeType, 0),
9: ('imported', p.BoolType, 0),
10: ('homescreen', p.BytesType, 0),
11: ('u2f_counter', p.UVarintType, 0),
12: ('needs_backup', p.BoolType, 0),
13: ('flags', p.UVarintType, 0),
14: ('u2froot', HDNodeType, 0),
}

View File

@ -118,4 +118,3 @@ from .WipeDevice import *
from .WordAck import *
from .WordRequest import *
from . import MessageType
from .Storage import *