File tree Expand file tree Collapse file tree 22 files changed +196
-0
lines changed
Expand file tree Collapse file tree 22 files changed +196
-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.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" ]
Original file line number Diff line number Diff line change 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 >= 5.28"
19+ - " protobuf >= 5.28.2"
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.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 == 4.0.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.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" ]
Original file line number Diff line number Diff line change 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 >= 5.28"
19+ - " protobuf >= 5.28.2"
Original file line number Diff line number Diff line change 1+ mypy-protobuf == 4.0.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
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.19
2+ FROM python:3.11.14-bookworm AS build
3+ WORKDIR /app
4+ RUN python -mvenv /app
5+ RUN . ./bin/activate \
6+ && pip install --no-cache-dir protoc-gen-connect-python==0.7.0 \
7+ && pip uninstall --yes pip setuptools \
8+ && rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1
9+
10+ FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base
11+
12+ FROM scratch
13+ COPY --link --from=base / /
14+ COPY --link --from=build --chmod=0755 /app /app
15+ USER nobody
16+ ENTRYPOINT [ "/app/bin/protoc-gen-connect-python" ]
You can’t perform that action at this time.
0 commit comments