File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ./meshtastic/pbDefinitions ./protobufs/meshtastic/* .proto
7+ ./nanopb-0.4.7/generator-bin/protoc -I=protobufs --python_out ./ ./protobufs/meshtastic/* .proto
88
99# workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628
1010
1111if [[ $OSTYPE == ' darwin' * ]]; then
12- sed -i ' ' -E ' s/^(import.*_pb2)/from . \1/' meshtastic/pbDefinitions/ * .py
12+ sed -i ' ' -E ' s/^(import.*_pb2)/from . \1/' meshtastic/* .py
1313 # automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/protobufs/issues/27)
14- sed -i ' ' -E " s/^None = 0/globals()['None'] = 0/" meshtastic/pbDefinitions/ mesh_pb2.py
14+ sed -i ' ' -E " s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py
1515else
16- sed -i -e ' s/^import.*_pb2/from . \0/' meshtastic/pbDefinitions/ * .py
16+ sed -i -e ' s/^import.*_pb2/from . \0/' meshtastic/* .py
1717 # automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/protobufs/issues/27)
18- sed -i -e " s/^None = 0/globals()['None'] = 0/" meshtastic/pbDefinitions/ mesh_pb2.py
18+ sed -i -e " s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py
1919fi
You can’t perform that action at this time.
0 commit comments