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/py/v0.2.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.2.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:705ee9b6af4891eaae0098008a8a99bb9b1246e3fa8b687519b87f8e355c3e0a 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:393cdf69ec7a5e217f837f2ff9b2123e06545d89c6e718c14ad020451fcb1900 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.2.0/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.2.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.2.0/LICENSE
output_languages:
- python
registry:
python:
package_type: "runtime"
requires_python: ">=3.10"
deps:
# https://pypi.org/project/protobuf-py/
- "protobuf-py>=0.2.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
2 changes: 2 additions & 0 deletions plugins/bufbuild/py/v0.2.0/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
protoc-gen-py==0.2.0
protobuf-py==0.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:aqKYNoU7+4nyOJG5vPljPhAK8e5bdj1bE1hZOk1WYBs=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:PRru2JdrUTXYlNwhgnRGB5Da8RNq2Oeg6A8CsywTBSI=
Loading