diff --git a/plugins/connectrpc/python/v0.9.0/.dockerignore b/plugins/connectrpc/python/v0.9.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/connectrpc/python/v0.9.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/connectrpc/python/v0.9.0/Dockerfile b/plugins/connectrpc/python/v0.9.0/Dockerfile new file mode 100644 index 000000000..56224a317 --- /dev/null +++ b/plugins/connectrpc/python/v0.9.0/Dockerfile @@ -0,0 +1,16 @@ +# syntax=docker/dockerfile:1.22 +FROM python:3.11.15-bookworm AS build +WORKDIR /app +RUN python -mvenv /app +RUN . ./bin/activate \ + && pip install --no-cache-dir protoc-gen-connect-python==0.9.0 \ + && pip uninstall --yes pip setuptools \ + && rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1 + +FROM gcr.io/distroless/python3-debian12:latest@sha256:e19b29c8473bed88f8b6e31e49d1133d1bdb2bf9c0af7e82d0e7434f7c036a63 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-connect-python" ] diff --git a/plugins/connectrpc/python/v0.9.0/buf.plugin.yaml b/plugins/connectrpc/python/v0.9.0/buf.plugin.yaml new file mode 100644 index 000000000..bd428d8d7 --- /dev/null +++ b/plugins/connectrpc/python/v0.9.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/connectrpc/python +plugin_version: v0.9.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.9.0/LICENSE +deps: + - plugin: buf.build/protocolbuffers/python:v34.0 +output_languages: + - python +registry: + python: + package_type: "runtime" + # https://github.com/connectrpc/connect-python/blob/v0.9.0/protoc-gen-connect-python/pyproject.toml#L11 + requires_python: ">=3.10" + deps: + # https://pypi.org/project/connect-python/ + - "connect-python >= 0.9.0" diff --git a/tests/testdata/buf.build/connectrpc/python/v0.9.0/eliza/plugin.sum b/tests/testdata/buf.build/connectrpc/python/v0.9.0/eliza/plugin.sum new file mode 100644 index 000000000..90b44e54b --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/python/v0.9.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:sPSeYSs5cOn8mT34fLpThgPoJ5s5E6YDnTg/9nGIhyk= diff --git a/tests/testdata/buf.build/connectrpc/python/v0.9.0/petapis/plugin.sum b/tests/testdata/buf.build/connectrpc/python/v0.9.0/petapis/plugin.sum new file mode 100644 index 000000000..a10ac6742 --- /dev/null +++ b/tests/testdata/buf.build/connectrpc/python/v0.9.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:EOstjjuW36oZDPfiW063oODluZszRkOzvwr3b3NvHbQ=