File tree Expand file tree Collapse file tree 12 files changed +99
-0
lines changed
Expand file tree Collapse file tree 12 files changed +99
-0
lines changed Original file line number Diff line number Diff line change 1+ *
2+ ! Dockerfile
3+ ! requirements.txt
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.19
2+ FROM python:3.11.13-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:afdfc6df9eb96cf65576d4d59af48c4b5dac29ad62066aee879f12b303298aac 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" ]
Original file line number Diff line number Diff line change 1+ version : v1
2+ name : buf.build/community/nipunn1313-mypy-grpc
3+ plugin_version : v3.7.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/v3.7.0/LICENSE
8+ output_languages :
9+ - python
10+ registry :
11+ python :
12+ package_type : " stub-only"
13+ # https://github.com/nipunn1313/mypy-protobuf/blob/v3.7.0/setup.cfg#L20
14+ requires_python : " >=3.8"
15+ deps :
16+ # https://github.com/nipunn1313/mypy-protobuf/tree/v3.7.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf
17+ # > Earlier releases might work, but aren't tested.
18+ - " types-protobuf >= 5.28"
19+ - " protobuf >= 5.28.2"
20+ # https://github.com/nipunn1313/mypy-protobuf/tree/v3.7.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.66.2"
23+ # https://pypi.org/project/grpcio-tools/
24+ - " grpcio-tools >= 1.66.2"
25+ # https://pypi.org/project/grpc-stubs/
26+ - " grpc-stubs >= 1.53.0.5"
Original file line number Diff line number Diff line change 1+ mypy-protobuf == 3.7.0
2+ protobuf == 6.33.1
3+ types-protobuf == 6.32.1.20251105
Original file line number Diff line number Diff line change 1+ *
2+ ! Dockerfile
3+ ! requirements.txt
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.19
2+ FROM python:3.11.13-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:afdfc6df9eb96cf65576d4d59af48c4b5dac29ad62066aee879f12b303298aac 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" ]
Original file line number Diff line number Diff line change 1+ version : v1
2+ name : buf.build/community/nipunn1313-mypy
3+ plugin_version : v3.7.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/v3.7.0/LICENSE
8+ output_languages :
9+ - python
10+ registry :
11+ python :
12+ package_type : " stub-only"
13+ # https://github.com/nipunn1313/mypy-protobuf/blob/v3.7.0/setup.cfg#L20
14+ requires_python : " >=3.8"
15+ deps :
16+ # https://github.com/nipunn1313/mypy-protobuf/tree/v3.7.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf
17+ # > Earlier releases might work, but aren't tested.
18+ - " types-protobuf >= 5.28"
19+ - " protobuf >= 5.28.2"
Original file line number Diff line number Diff line change 1+ mypy-protobuf == 3.7.0
2+ protobuf == 6.33.1
3+ types-protobuf == 6.32.1.20251105
Original file line number Diff line number Diff line change 1+ h1:BYBWcreiMNyJTziSDWALko0+It2W4rJ10gW7o7SFwt0=
Original file line number Diff line number Diff line change 1+ h1:1+ccsrCy1Elhcob9b7xjjzSeqcvX94svl2IgCvDssnM=
You can’t perform that action at this time.
0 commit comments