Skip to content

Commit

Permalink
Add python bindings for protobufs
Browse files Browse the repository at this point in the history
- Added Makefile command to generate these bindings
- Ran into trouble with the folder path not being
preserved. You'll notice that the generated files
are in v1/0 instead of the to-be expected v1.0/.
That is not intentional, but I'm not sure how to
correct this without implementing a hack.

Signed-off-by: Chasen Bettinger <[email protected]>
  • Loading branch information
chasen-bettinger committed Mar 28, 2023
1 parent 95a461d commit 09cf039
Show file tree
Hide file tree
Showing 4 changed files with 818 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ go_setup:
go_protos: go_setup
protoc --go_out=go --go_opt=paths=source_relative $(shell find ./spec -name "*.proto")

# Creates the python libs in the python/ directory.
python_protos:
mkdir -p python
protoc -I ./spec --python_out=python $(shell find ./spec -name "*.proto")

run:
go run go/example/main.go
Loading

0 comments on commit 09cf039

Please sign in to comment.