diff --git a/plugins/connectrpc/python/source.yaml b/plugins/connectrpc/python/source.yaml index 0199a43fa..84b7bc6d4 100644 --- a/plugins/connectrpc/python/source.yaml +++ b/plugins/connectrpc/python/source.yaml @@ -1,3 +1,3 @@ source: pypi: - name: protoc-gen-connect-python + name: protoc-gen-connectrpc diff --git a/plugins/connectrpc/python/v0.10.0/.dockerignore b/plugins/connectrpc/python/v0.10.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/connectrpc/python/v0.10.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/connectrpc/python/v0.10.0/Dockerfile b/plugins/connectrpc/python/v0.10.0/Dockerfile new file mode 100644 index 000000000..2edb01008 --- /dev/null +++ b/plugins/connectrpc/python/v0.10.0/Dockerfile @@ -0,0 +1,16 @@ +# syntax=docker/dockerfile:1.23 +FROM python:3.13.13-trixie@sha256:d52f7ef162003e17330f0dd9c3e0b4ac6775b39ea988be0c23de6d1461191569 AS build +WORKDIR /app +RUN python -mvenv /app +RUN . ./bin/activate \ + && pip install --no-cache-dir protoc-gen-connectrpc==0.10.0 \ + && pip uninstall --yes pip setuptools \ + && rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1 + +FROM gcr.io/distroless/python3-debian13:latest@sha256:ed3a4beb46f8f8baac068743ba1b1f95ea3f793422129cf6dd23967f779b6018 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-connectrpc" ] diff --git a/plugins/connectrpc/python/v0.10.0/buf.plugin.yaml b/plugins/connectrpc/python/v0.10.0/buf.plugin.yaml new file mode 100644 index 000000000..32ed80724 --- /dev/null +++ b/plugins/connectrpc/python/v0.10.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/connectrpc/python +plugin_version: v0.10.0 +source_url: https://github.com/connectrpc/connect-python +description: Generates client and server stubs for Connect Python. Compatible with the Connect RPC protocol. +spdx_license_id: Apache-2.0 +license_url: https://github.com/connectrpc/connect-python/blob/v0.10.0/LICENSE +deps: + - plugin: buf.build/protocolbuffers/python:v34.1 +output_languages: + - python +registry: + python: + package_type: "runtime" + # https://github.com/connectrpc/connect-python/blob/v0.10.0/pyproject.toml#L6 + requires_python: ">=3.10" + deps: + # https://pypi.org/project/connectrpc/ + - "connectrpc >= 0.10.0" diff --git a/tests/testdata/buf.build/connectrpc/python/v0.10.0/eliza/plugin.sum b/tests/testdata/buf.build/connectrpc/python/v0.10.0/eliza/plugin.sum new file mode 100644 index 000000000..db2e2b405 --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/python/v0.10.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:LpJjOtyydXWEnRCyIfCXYt9bW4JTyZD9Np0ImaQfA20= diff --git a/tests/testdata/buf.build/connectrpc/python/v0.10.0/petapis/plugin.sum b/tests/testdata/buf.build/connectrpc/python/v0.10.0/petapis/plugin.sum new file mode 100644 index 000000000..5843f90b2 --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/python/v0.10.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:nKVTVFmZL7Rn954sFPHBEjW1fQ3KlME6tcW3Y2r+CNg=