diff --git a/plugins/bufbuild/grpc-py/source.yaml b/plugins/bufbuild/grpc-py/source.yaml new file mode 100644 index 000000000..05578a0db --- /dev/null +++ b/plugins/bufbuild/grpc-py/source.yaml @@ -0,0 +1,3 @@ +source: + pypi: + name: protoc-gen-grpc-py diff --git a/plugins/bufbuild/grpc-py/v0.1.0/.dockerignore b/plugins/bufbuild/grpc-py/v0.1.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/bufbuild/grpc-py/v0.1.0/Dockerfile b/plugins/bufbuild/grpc-py/v0.1.0/Dockerfile new file mode 100644 index 000000000..780a8a614 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.0/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1.24 +FROM python:3.13.14-trixie@sha256:6cd5c8d0efe5d264728f3690053b26807572f25805a643395752eca19148e31c AS build +WORKDIR /app +RUN python -mvenv /app +ADD /requirements.txt requirements.txt +RUN . ./bin/activate \ + && pip install --no-cache-dir -r requirements.txt \ + && pip uninstall --yes pip setuptools \ + && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ + && ln -sf /usr/bin/python /app/bin/python + +FROM gcr.io/distroless/python3-debian13:latest@sha256:178dd00f2da3271f3819df5cd327472754946c7430d82197b247e95e839a3d55 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /app /app +USER nobody +CMD [ "/app/bin/protoc-gen-grpc-py" ] diff --git a/plugins/bufbuild/grpc-py/v0.1.0/buf.plugin.yaml b/plugins/bufbuild/grpc-py/v0.1.0/buf.plugin.yaml new file mode 100644 index 000000000..332a16499 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/bufbuild/grpc-py +plugin_version: v0.1.0 +source_url: https://github.com/bufbuild/protobuf-py +description: Generates gRPC-Python stubs that use protobuf-py. +spdx_license_id: Apache-2.0 +license_url: https://github.com/bufbuild/protobuf-py/blob/v0.1.0/LICENSE +output_languages: +- python diff --git a/plugins/bufbuild/grpc-py/v0.1.0/requirements.txt b/plugins/bufbuild/grpc-py/v0.1.0/requirements.txt new file mode 100644 index 000000000..2edd74160 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.0/requirements.txt @@ -0,0 +1,2 @@ +protoc-gen-grpc-py==0.1.0 +protobuf-py==0.1.0 diff --git a/plugins/bufbuild/py/source.yaml b/plugins/bufbuild/py/source.yaml new file mode 100644 index 000000000..79bfc9326 --- /dev/null +++ b/plugins/bufbuild/py/source.yaml @@ -0,0 +1,3 @@ +source: + pypi: + name: protoc-gen-py diff --git a/plugins/bufbuild/py/v0.1.0/.dockerignore b/plugins/bufbuild/py/v0.1.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/bufbuild/py/v0.1.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/bufbuild/py/v0.1.0/Dockerfile b/plugins/bufbuild/py/v0.1.0/Dockerfile new file mode 100644 index 000000000..bc3452cba --- /dev/null +++ b/plugins/bufbuild/py/v0.1.0/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1.24 +FROM python:3.13.14-trixie@sha256:6cd5c8d0efe5d264728f3690053b26807572f25805a643395752eca19148e31c AS build +WORKDIR /app +RUN python -mvenv /app +ADD /requirements.txt requirements.txt +RUN . ./bin/activate \ + && pip install --no-cache-dir -r requirements.txt \ + && pip uninstall --yes pip setuptools \ + && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ + && ln -sf /usr/bin/python /app/bin/python + +FROM gcr.io/distroless/python3-debian13:latest@sha256:178dd00f2da3271f3819df5cd327472754946c7430d82197b247e95e839a3d55 AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /app /app +USER nobody +CMD [ "/app/bin/protoc-gen-py" ] diff --git a/plugins/bufbuild/py/v0.1.0/buf.plugin.yaml b/plugins/bufbuild/py/v0.1.0/buf.plugin.yaml new file mode 100644 index 000000000..d94594b83 --- /dev/null +++ b/plugins/bufbuild/py/v0.1.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/bufbuild/py +plugin_version: v0.1.0 +source_url: https://github.com/bufbuild/protobuf-py +description: Generates idiomatic Python code from Protocol Buffers definitions using protobuf-py. +spdx_license_id: Apache-2.0 +license_url: https://github.com/bufbuild/protobuf-py/blob/v0.1.0/LICENSE +output_languages: +- python diff --git a/plugins/bufbuild/py/v0.1.0/requirements.txt b/plugins/bufbuild/py/v0.1.0/requirements.txt new file mode 100644 index 000000000..68d1db0aa --- /dev/null +++ b/plugins/bufbuild/py/v0.1.0/requirements.txt @@ -0,0 +1,2 @@ +protoc-gen-py==0.1.0 +protobuf-py==0.1.0 diff --git a/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.0/eliza/plugin.sum b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.0/eliza/plugin.sum new file mode 100644 index 000000000..71a26d159 --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:wdGL/hhygmX2UJTQLuvxfG3pzGKaDCpKkgj7ZqxMqjI= diff --git a/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.0/petapis/plugin.sum b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.0/petapis/plugin.sum new file mode 100644 index 000000000..3c68ed1cd --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:97vUB45Ncv1/Mup7CWznehP8KlQn8FilfFHxQdhSdPE= diff --git a/tests/testdata/buf.build/bufbuild/py/v0.1.0/eliza/plugin.sum b/tests/testdata/buf.build/bufbuild/py/v0.1.0/eliza/plugin.sum new file mode 100644 index 000000000..7f881257c --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/py/v0.1.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:Z4ujnMaUqAx5MkSxqDYnSs+lpff+gB56lsCxmlazOh8= diff --git a/tests/testdata/buf.build/bufbuild/py/v0.1.0/petapis/plugin.sum b/tests/testdata/buf.build/bufbuild/py/v0.1.0/petapis/plugin.sum new file mode 100644 index 000000000..8da21b39a --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/py/v0.1.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:Lgw5JgEysTjGkyyIZnzKA5GOaSo/webhEJxcRJ7uuNY=