Skip to content

Commit 7d706bc

Browse files
Update bufbuild/py (#2601)
1 parent ea40ca5 commit 7d706bc

6 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!requirements.txt
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# syntax=docker/dockerfile:1.24
2+
FROM python:3.13.14-trixie@sha256:705ee9b6af4891eaae0098008a8a99bb9b1246e3fa8b687519b87f8e355c3e0a AS build
3+
WORKDIR /app
4+
RUN python -mvenv /app
5+
ADD /requirements.txt requirements.txt
6+
RUN . ./bin/activate \
7+
&& pip install --no-cache-dir -r requirements.txt \
8+
&& pip uninstall --yes pip setuptools \
9+
&& rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \
10+
&& ln -sf /usr/bin/python /app/bin/python
11+
12+
FROM gcr.io/distroless/python3-debian13:latest@sha256:393cdf69ec7a5e217f837f2ff9b2123e06545d89c6e718c14ad020451fcb1900 AS base
13+
14+
FROM scratch
15+
COPY --link --from=base / /
16+
COPY --link --from=build --chmod=0755 /app /app
17+
USER nobody
18+
CMD [ "/app/bin/protoc-gen-py" ]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: v1
2+
name: buf.build/bufbuild/py
3+
plugin_version: v0.2.0
4+
source_url: https://github.com/bufbuild/protobuf-py
5+
description: Generates idiomatic Python code from Protocol Buffers definitions using protobuf-py.
6+
spdx_license_id: Apache-2.0
7+
license_url: https://github.com/bufbuild/protobuf-py/blob/v0.2.0/LICENSE
8+
output_languages:
9+
- python
10+
registry:
11+
python:
12+
package_type: "runtime"
13+
requires_python: ">=3.10"
14+
deps:
15+
# https://pypi.org/project/protobuf-py/
16+
- "protobuf-py>=0.2.0"
17+
opts:
18+
# Produce PEP 420 namespace packages so the py, grpc-py, and dependency
19+
# SDKs for a module can share the same top-level package.
20+
- init_files=false
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
protoc-gen-py==0.2.0
2+
protobuf-py==0.2.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:aqKYNoU7+4nyOJG5vPljPhAK8e5bdj1bE1hZOk1WYBs=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:PRru2JdrUTXYlNwhgnRGB5Da8RNq2Oeg6A8CsywTBSI=

0 commit comments

Comments
 (0)