Skip to content

Commit 90abeb4

Browse files
Found new plugin versions (#2165)
1 parent 4340d22 commit 90abeb4

File tree

39 files changed

+1066
-0
lines changed

39 files changed

+1066
-0
lines changed
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# syntax=docker/dockerfile:1.19
2+
FROM python:3.11.14-bookworm 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+
&& rm -f bin/protoc-gen-mypy \
11+
&& ln -sf /usr/bin/python /app/bin/python
12+
13+
FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base
14+
15+
FROM scratch
16+
COPY --link --from=base / /
17+
COPY --link --from=build /app /app
18+
USER nobody
19+
ENTRYPOINT [ "/app/bin/protoc-gen-mypy_grpc" ]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: v1
2+
name: buf.build/community/nipunn1313-mypy-grpc
3+
plugin_version: v4.0.0
4+
source_url: https://github.com/nipunn1313/mypy-protobuf
5+
description: Generate mypy stub files for grpcio generated code.
6+
spdx_license_id: Apache-2.0
7+
license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/LICENSE
8+
output_languages:
9+
- python
10+
registry:
11+
python:
12+
package_type: "stub-only"
13+
# https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/setup.cfg#L20
14+
requires_python: ">=3.8"
15+
deps:
16+
# https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf
17+
# > Earlier releases might work, but aren't tested.
18+
- "types-protobuf >= 6.32"
19+
- "protobuf >= 6.32"
20+
# https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#to-run-typecheckers-on-code-generated-with-grpc-plugin---youll-additionally-need
21+
# > Earlier releases might work, but aren't tested
22+
- "grpcio >= 1.70"
23+
# https://pypi.org/project/grpcio-tools/
24+
- "grpcio-tools >= 1.70"
25+
# https://pypi.org/project/types-grpcio/
26+
- "types-grpcio >= 1.0.0.20251009"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mypy-protobuf==4.0.0
2+
protobuf==6.33.1
3+
types-protobuf==6.32.1.20251105
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# syntax=docker/dockerfile:1.19
2+
FROM python:3.11.14-bookworm 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+
&& rm -f bin/protoc-gen-mypy_grpc \
11+
&& ln -sf /usr/bin/python /app/bin/python
12+
13+
FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base
14+
15+
FROM scratch
16+
COPY --link --from=base / /
17+
COPY --link --from=build /app /app
18+
USER nobody
19+
ENTRYPOINT [ "/app/bin/protoc-gen-mypy" ]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: v1
2+
name: buf.build/community/nipunn1313-mypy
3+
plugin_version: v4.0.0
4+
source_url: https://github.com/nipunn1313/mypy-protobuf
5+
description: Generate mypy stub files from Protobuf definitions.
6+
spdx_license_id: Apache-2.0
7+
license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/LICENSE
8+
output_languages:
9+
- python
10+
registry:
11+
python:
12+
package_type: "stub-only"
13+
# https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/setup.cfg#L20
14+
requires_python: ">=3.8"
15+
deps:
16+
# https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf
17+
# > Earlier releases might work, but aren't tested.
18+
- "types-protobuf >= 6.32"
19+
- "protobuf >= 6.32"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mypy-protobuf==4.0.0
2+
protobuf==6.33.1
3+
types-protobuf==6.32.1.20251105
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# syntax=docker/dockerfile:1.19
2+
FROM --platform=$BUILDPLATFORM golang:1.25.5-bookworm AS build
3+
4+
ARG TARGETOS TARGETARCH
5+
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
6+
7+
RUN --mount=type=cache,target=/go/pkg/mod \
8+
go install -ldflags "-s -w" -tags remote_plugin -trimpath github.com/sudorandom/protoc-gen-connect-openapi@v0.22.0 \
9+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-connect-openapi /go/bin/protoc-gen-connect-openapi || true
10+
11+
FROM scratch
12+
COPY --from=build --link /etc/passwd /etc/passwd
13+
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-connect-openapi .
14+
USER nobody
15+
ENTRYPOINT [ "/protoc-gen-connect-openapi" ]

0 commit comments

Comments
 (0)