Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugins/bufbuild/grpc-py/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source:
pypi:
name: protoc-gen-grpc-py
3 changes: 3 additions & 0 deletions plugins/bufbuild/grpc-py/v0.1.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!requirements.txt
18 changes: 18 additions & 0 deletions plugins/bufbuild/grpc-py/v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
9 changes: 9 additions & 0 deletions plugins/bufbuild/grpc-py/v0.1.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Generates gRPC-Python stubs that use protobuf-py.
description: Generates gRPC-Python stubs that use protobuf-py.
deps:
- plugin: buf.build/bufbuild/py:v0.1.0

spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/protobuf-py/blob/v0.1.0/LICENSE
output_languages:
- python

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- python
- python
registry:
python:
package_type: "runtime"
requires_python: ">=3.10"
deps:
# https://pypi.org/project/grpcio/
- "grpcio>=1.68"

not sure if it should be 1.68 though

2 changes: 2 additions & 0 deletions plugins/bufbuild/grpc-py/v0.1.0/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
protoc-gen-grpc-py==0.1.0
protobuf-py==0.1.0
3 changes: 3 additions & 0 deletions plugins/bufbuild/py/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source:
pypi:
name: protoc-gen-py
3 changes: 3 additions & 0 deletions plugins/bufbuild/py/v0.1.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!requirements.txt
18 changes: 18 additions & 0 deletions plugins/bufbuild/py/v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
9 changes: 9 additions & 0 deletions plugins/bufbuild/py/v0.1.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -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

@oliversun9 oliversun9 Jun 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- python
- python
registry:
python:
package_type: "runtime"
requires_python: ">=3.10"
deps:
# https://pypi.org/project/protobuf-py/
- "protobuf-py>=0.1.0"
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

I think we need - init_files=false?

2 changes: 2 additions & 0 deletions plugins/bufbuild/py/v0.1.0/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
protoc-gen-py==0.1.0
protobuf-py==0.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:wdGL/hhygmX2UJTQLuvxfG3pzGKaDCpKkgj7ZqxMqjI=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:97vUB45Ncv1/Mup7CWznehP8KlQn8FilfFHxQdhSdPE=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:Z4ujnMaUqAx5MkSxqDYnSs+lpff+gB56lsCxmlazOh8=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:Lgw5JgEysTjGkyyIZnzKA5GOaSo/webhEJxcRJ7uuNY=
Loading