Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
poetry, CI: insist in protobuf v21.12 in both Python and CI.
Browse files Browse the repository at this point in the history
And re-ran poetry update which updated the lock file ofc.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell committed Jun 20, 2023
1 parent 1e52f9f commit 84b41a7
Showing 3 changed files with 104 additions and 21 deletions.
22 changes: 20 additions & 2 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -73,10 +73,28 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \

# We also need a relatively recent protobuf-compiler, at least 3.12.0,
# in order to support the experimental `optional` flag.
PROTOC_VERSION=3.15.8

# BUT WAIT! Gentoo wants this to match the version from the Python protobuf,
# which comes from the same tree. Makes sense!

# And
# grpcio-tools-1.54.0` requires `protobuf = ">=4.21.6,<5.0dev"`

# Now, protoc changed to date-based releases, BUT Python protobuf
# didn't, so Python protobuf 4.21.12 (in Ubuntu 23.04) corresponds to
# protoc 21.12 (which, FYI, is packaged in Ubuntu as version 3.21.12).

# So we're going to nail these versions as 21.12, which is what recent
# Ubuntu has, and hopefully everyone else can get. And this means that
# When CI checks that no files have changed under regeneration, you won't
# get a fail just because the dev's protoc is a different version.

# Honorable mention go to Matt Whitlock for spelunking this horror with me!

PROTOC_VERSION=21.12
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
sudo unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local/
sudo unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local/
sudo chmod a+x /usr/local/bin/protoc
export PROTOC=/usr/local/bin/protoc
export PATH=$PATH:/usr/local/bin
101 changes: 82 additions & 19 deletions poetry.lock
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@ Mako = "^1.1.6"
websocket-client = "^1.2.3"
grpcio-tools = "^1"
grpcio = "^1"
# We want a specific version of protobuf to match CI's .github/scripts/setup.sh
protobuf = "4.21.12"
cryptography = "^41.0.1"

[tool.poetry.dev-dependencies]

0 comments on commit 84b41a7

Please sign in to comment.