Skip to content

Commit 46edd78

Browse files
committed
For poetry change: need to put venv in our path so mypy protobuf plugin works
# Conflicts: # bin/regen-protobufs.sh
1 parent 67e1e7c commit 46edd78

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/update_protobufs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
tar xvzf nanopb-0.4.6-linux-x86.tar.gz
2323
mv nanopb-0.4.6-linux-x86 nanopb-0.4.6
2424
25+
- name: Install poetry (needed by regen-protobufs.sh)
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip3 install poetry
29+
2530
- name: Re-generate protocol buffers
2631
run: |
2732
./bin/regen-protobufs.sh

bin/regen-protobufs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#gsed -i 's/import "\//import ".\//g' ./protobufs/meshtastic/*
55
#gsed -i 's/package meshtastic;//g' ./protobufs/meshtastic/*
66

7+
# protoc looks for mypy plugin in the python path
8+
source $(poetry env info --path)/bin/activate
9+
710
./nanopb-0.4.6/generator-bin/protoc -I=protobufs --python_out ./ --mypy_out ./ ./protobufs/meshtastic/*.proto
811
./nanopb-0.4.6/generator-bin/protoc -I=protobufs --python_out ./meshtastic/ --mypy_out ./meshtastic/ ./protobufs/nanopb.proto
912

0 commit comments

Comments
 (0)