For poetry change: need to put venv in our path so mypy protobuf plugin works

# Conflicts:
#	bin/regen-protobufs.sh
This commit is contained in:
Kevin Hester
2024-06-25 10:25:52 -07:00
parent 67e1e7c318
commit 46edd78f92
2 changed files with 8 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ jobs:
tar xvzf nanopb-0.4.6-linux-x86.tar.gz
mv nanopb-0.4.6-linux-x86 nanopb-0.4.6
- name: Install poetry (needed by regen-protobufs.sh)
run: |
python -m pip install --upgrade pip
pip3 install poetry
- name: Re-generate protocol buffers
run: |
./bin/regen-protobufs.sh

View File

@@ -4,6 +4,9 @@
#gsed -i 's/import "\//import ".\//g' ./protobufs/meshtastic/*
#gsed -i 's/package meshtastic;//g' ./protobufs/meshtastic/*
# protoc looks for mypy plugin in the python path
source $(poetry env info --path)/bin/activate
./nanopb-0.4.6/generator-bin/protoc -I=protobufs --python_out ./ --mypy_out ./ ./protobufs/meshtastic/*.proto
./nanopb-0.4.6/generator-bin/protoc -I=protobufs --python_out ./meshtastic/ --mypy_out ./meshtastic/ ./protobufs/nanopb.proto