Skip to content
Merged
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.1/.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.1/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" ]
18 changes: 18 additions & 0 deletions plugins/bufbuild/grpc-py/v0.1.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -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"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the latest is 1.81.1 but the example uses 1.68

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is ok - I think we deliberately leave these on older versions to simplify dependency selection.

2 changes: 2 additions & 0 deletions plugins/bufbuild/grpc-py/v0.1.1/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
protoc-gen-grpc-py==0.1.1
protobuf-py==0.1.1
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.1/.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.1/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" ]
20 changes: 20 additions & 0 deletions plugins/bufbuild/py/v0.1.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I assume this is needed

2 changes: 2 additions & 0 deletions plugins/bufbuild/py/v0.1.1/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
protoc-gen-py==0.1.1
protobuf-py==0.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:915qt2QX0WSiD+DCzYQt4c7cJ7q7zzJKCWVT5WML5io=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:afF3VoEXtUWEMMnNwVdbF0R1VuEsxS1dnFvK8V7pjNQ=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:cciZOCATI5rozXkNDtAXxx/KMdfKbhrnXk8SEUQTMIs=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:rdDQF228yTFMvpTjAVPmS3eOetrhYqnPUXehW2HKvHY=
Loading