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/community/nipunn1313-mypy-grpc/v5.0.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!requirements.txt
19 changes: 19 additions & 0 deletions plugins/community/nipunn1313-mypy-grpc/v5.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1.23
FROM python:3.13.13-trixie@sha256:65f8aa71dc4312ad477efc04f3756609e586204500d5d13ab85d38e6917c629f 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 \
&& rm -f bin/protoc-gen-mypy \
&& ln -sf /usr/bin/python /app/bin/python

FROM gcr.io/distroless/python3-debian13:latest@sha256:ed3a4beb46f8f8baac068743ba1b1f95ea3f793422129cf6dd23967f779b6018 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build /app /app
USER nobody
ENTRYPOINT [ "/app/bin/protoc-gen-mypy_grpc" ]
26 changes: 26 additions & 0 deletions plugins/community/nipunn1313-mypy-grpc/v5.0.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: v1
name: buf.build/community/nipunn1313-mypy-grpc
plugin_version: v5.0.0
source_url: https://github.com/nipunn1313/mypy-protobuf
description: Generate mypy stub files for grpcio generated code.
spdx_license_id: Apache-2.0
license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v5.0.0/LICENSE
output_languages:
- python
registry:
python:
package_type: "stub-only"
# https://github.com/nipunn1313/mypy-protobuf/blob/v5.0.0/setup.cfg#L20
requires_python: ">=3.8"
deps:
# https://github.com/nipunn1313/mypy-protobuf/tree/v5.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf
# > Earlier releases might work, but aren't tested.
- "types-protobuf >= 6.32"
- "protobuf >= 6.32"
# https://github.com/nipunn1313/mypy-protobuf/tree/v5.0.0#to-run-typecheckers-on-code-generated-with-grpc-plugin---youll-additionally-need
# > Earlier releases might work, but aren't tested
- "grpcio >= 1.70"
# https://pypi.org/project/grpcio-tools/
- "grpcio-tools >= 1.70"
# https://pypi.org/project/types-grpcio/
- "types-grpcio >= 1.0.0.20251009"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mypy-protobuf==5.0.0
protobuf==6.33.1
types-protobuf==6.32.1.20251105
3 changes: 3 additions & 0 deletions plugins/community/nipunn1313-mypy/v5.0.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!requirements.txt
19 changes: 19 additions & 0 deletions plugins/community/nipunn1313-mypy/v5.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1.23
FROM python:3.13.13-trixie@sha256:65f8aa71dc4312ad477efc04f3756609e586204500d5d13ab85d38e6917c629f 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 \
&& rm -f bin/protoc-gen-mypy_grpc \
&& ln -sf /usr/bin/python /app/bin/python

FROM gcr.io/distroless/python3-debian13:latest@sha256:ed3a4beb46f8f8baac068743ba1b1f95ea3f793422129cf6dd23967f779b6018 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build /app /app
USER nobody
ENTRYPOINT [ "/app/bin/protoc-gen-mypy" ]
19 changes: 19 additions & 0 deletions plugins/community/nipunn1313-mypy/v5.0.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v1
name: buf.build/community/nipunn1313-mypy
plugin_version: v5.0.0
source_url: https://github.com/nipunn1313/mypy-protobuf
description: Generate mypy stub files from Protobuf definitions.
spdx_license_id: Apache-2.0
license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v5.0.0/LICENSE
output_languages:
- python
registry:
python:
package_type: "stub-only"
# https://github.com/nipunn1313/mypy-protobuf/blob/v5.0.0/pyproject.toml#L21
requires_python: ">=3.8"
deps:
# https://github.com/nipunn1313/mypy-protobuf/tree/v5.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf
# > Earlier releases might work, but aren't tested.
- "types-protobuf >= 6.32"
- "protobuf >= 6.32"
3 changes: 3 additions & 0 deletions plugins/community/nipunn1313-mypy/v5.0.0/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mypy-protobuf==5.0.0
protobuf==6.33.1
types-protobuf==6.32.1.20251105
3 changes: 3 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.29.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!separate_pkg_additional_imports.patch
23 changes: 23 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.29.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# syntax=docker/dockerfile:1.23
FROM --platform=$BUILDPLATFORM golang:1.26.2-trixie@sha256:c0074c718b473f3827043f86532c4c0ff537e3fe7a81b8219b0d1ccfcc2c9a09 AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

WORKDIR /tmp
RUN git clone --depth 1 --branch v2.29.0 https://github.com/grpc-ecosystem/grpc-gateway.git
COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway
RUN git apply /tmp/separate_pkg_additional_imports.patch
RUN --mount=type=cache,target=/go/pkg/mod \
GOOS= GOARCH= go test -run 'TestGenerator_GenerateSeparatePackage' ./protoc-gen-grpc-gateway/internal/gengateway/
WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway
RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-gateway /go/bin/protoc-gen-grpc-gateway || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-gateway /
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-gateway" ]
23 changes: 23 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.29.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: v1
name: buf.build/grpc-ecosystem/gateway
plugin_version: v2.29.0
source_url: https://github.com/grpc-ecosystem/grpc-gateway
description: gRPC to JSON proxy generator following the gRPC HTTP spec.
deps:
- plugin: buf.build/protocolbuffers/go:v1.36.11
- plugin: buf.build/grpc/go:v1.6.1
output_languages:
- go
registry:
go:
min_version: "1.25"
deps:
- module: github.com/grpc-ecosystem/grpc-gateway/v2
version: v2.29.0
opts:
- paths=source_relative
- standalone=true
- separate_package=true
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.29.0/LICENSE
integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage
Loading
Loading