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.1/.dockerignore b/plugins/bufbuild/grpc-py/v0.1.1/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.1/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/bufbuild/grpc-py/v0.1.1/Dockerfile b/plugins/bufbuild/grpc-py/v0.1.1/Dockerfile new file mode 100644 index 000000000..780a8a614 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.1/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.1/buf.plugin.yaml b/plugins/bufbuild/grpc-py/v0.1.1/buf.plugin.yaml new file mode 100644 index 000000000..4abf38b96 --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.1/buf.plugin.yaml @@ -0,0 +1,18 @@ +version: v1 +name: buf.build/bufbuild/grpc-py +plugin_version: v0.1.1 +source_url: https://github.com/bufbuild/protobuf-py +description: Generates gRPC-Python stubs that use protobuf-py. +deps: + - plugin: buf.build/bufbuild/py:v0.1.1 +spdx_license_id: Apache-2.0 +license_url: https://github.com/bufbuild/protobuf-py/blob/v0.1.1/LICENSE +output_languages: +- python +registry: + python: + package_type: "runtime" + requires_python: ">=3.10" + deps: + # https://pypi.org/project/grpcio/ + - "grpcio>=1.68" diff --git a/plugins/bufbuild/grpc-py/v0.1.1/requirements.txt b/plugins/bufbuild/grpc-py/v0.1.1/requirements.txt new file mode 100644 index 000000000..072c5fa1c --- /dev/null +++ b/plugins/bufbuild/grpc-py/v0.1.1/requirements.txt @@ -0,0 +1,2 @@ +protoc-gen-grpc-py==0.1.1 +protobuf-py==0.1.1 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.1/.dockerignore b/plugins/bufbuild/py/v0.1.1/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/bufbuild/py/v0.1.1/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/bufbuild/py/v0.1.1/Dockerfile b/plugins/bufbuild/py/v0.1.1/Dockerfile new file mode 100644 index 000000000..bc3452cba --- /dev/null +++ b/plugins/bufbuild/py/v0.1.1/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.1/buf.plugin.yaml b/plugins/bufbuild/py/v0.1.1/buf.plugin.yaml new file mode 100644 index 000000000..003ab8c17 --- /dev/null +++ b/plugins/bufbuild/py/v0.1.1/buf.plugin.yaml @@ -0,0 +1,20 @@ +version: v1 +name: buf.build/bufbuild/py +plugin_version: v0.1.1 +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.1/LICENSE +output_languages: +- python +registry: + python: + package_type: "runtime" + requires_python: ">=3.10" + deps: + # https://pypi.org/project/protobuf-py/ + - "protobuf-py>=0.1.1" + opts: + # Produce PEP 420 namespace packages so the py, grpc-py, and dependency + # SDKs for a module can share the same top-level package. + - init_files=false diff --git a/plugins/bufbuild/py/v0.1.1/requirements.txt b/plugins/bufbuild/py/v0.1.1/requirements.txt new file mode 100644 index 000000000..157977185 --- /dev/null +++ b/plugins/bufbuild/py/v0.1.1/requirements.txt @@ -0,0 +1,2 @@ +protoc-gen-py==0.1.1 +protobuf-py==0.1.1 diff --git a/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.1/eliza/plugin.sum b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.1/eliza/plugin.sum new file mode 100644 index 000000000..3805dcdb2 --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.1/eliza/plugin.sum @@ -0,0 +1 @@ +h1:915qt2QX0WSiD+DCzYQt4c7cJ7q7zzJKCWVT5WML5io= diff --git a/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.1/petapis/plugin.sum b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.1/petapis/plugin.sum new file mode 100644 index 000000000..23f529e69 --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/grpc-py/v0.1.1/petapis/plugin.sum @@ -0,0 +1 @@ +h1:afF3VoEXtUWEMMnNwVdbF0R1VuEsxS1dnFvK8V7pjNQ= diff --git a/tests/testdata/buf.build/bufbuild/py/v0.1.1/eliza/plugin.sum b/tests/testdata/buf.build/bufbuild/py/v0.1.1/eliza/plugin.sum new file mode 100644 index 000000000..d76c9db23 --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/py/v0.1.1/eliza/plugin.sum @@ -0,0 +1 @@ +h1:cciZOCATI5rozXkNDtAXxx/KMdfKbhrnXk8SEUQTMIs= diff --git a/tests/testdata/buf.build/bufbuild/py/v0.1.1/petapis/plugin.sum b/tests/testdata/buf.build/bufbuild/py/v0.1.1/petapis/plugin.sum new file mode 100644 index 000000000..df034ea2b --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/py/v0.1.1/petapis/plugin.sum @@ -0,0 +1 @@ +h1:rdDQF228yTFMvpTjAVPmS3eOetrhYqnPUXehW2HKvHY=