jaybdub / enes499

Files, programs, and project management for UMD's enes499 course.
0 stars 0 forks source link

Get protoc to compile nanopb .proto files into python code #12

Closed jaybdub closed 10 years ago

jaybdub commented 10 years ago

I successfully compiled the .proto into python using the following command

protoc --python_out=. -I/usr/include -I/home/john/nanopb/generator/proto -I. message.proto

However, thee _pb2.py file that was generated is still untested.

jaybdub commented 10 years ago

I generate the nanopb_pb2.py using the following command.

protoc --python_out=. -I/usr/include -I/home/john/nanopb/generator/proto -I. /home/john/nanopb/generator/proto/nanopb.proto 
jaybdub commented 10 years ago

See https://github.com/ilyevsky/beerduino/blob/master/python/Makefile

jaybdub commented 10 years ago

Solved, had to -I all of the relevant directories.