From a1b75b879d81e53fe5ab5db5ee2d36612270f9a3 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 3 Oct 2016 18:16:15 +0200 Subject: [PATCH] remove the need for pb2 subdir for pb2py generator --- tools/build_pb.sh | 6 ++++++ tools/pb2/.gitignore | 2 -- tools/pb2/__init__.py | 0 3 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 tools/pb2/.gitignore delete mode 100644 tools/pb2/__init__.py diff --git a/tools/build_pb.sh b/tools/build_pb.sh index a6281590b..53c435711 100755 --- a/tools/build_pb.sh +++ b/tools/build_pb.sh @@ -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/ diff --git a/tools/pb2/.gitignore b/tools/pb2/.gitignore deleted file mode 100644 index d3090fca3..000000000 --- a/tools/pb2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*_pb2.py -*.pyc diff --git a/tools/pb2/__init__.py b/tools/pb2/__init__.py deleted file mode 100644 index e69de29bb..000000000