Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7bea6f6

Browse filesBrowse files
committed
For poetry change: need to put venv in our path so mypy protobuf plugin works
1 parent 725de4c commit 7bea6f6
Copy full SHA for 7bea6f6

File tree

Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Open diff view settings
Collapse file

‎.github/workflows/update_protobufs.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/update_protobufs.yml
+5Lines 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
Collapse file

‎bin/regen-protobufs.sh‎

Copy file name to clipboardExpand all lines: bin/regen-protobufs.sh
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
#gsed -i 's/import "\//import ".\//g' ./protobufs/meshtastic/*
55
#gsed -i 's/package meshtastic;//g' ./protobufs/meshtastic/*
66

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

1013
# workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628
1114

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.