diff --git a/plugins/community/nipunn1313-mypy-grpc/v3.7.0/.dockerignore b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/community/nipunn1313-mypy-grpc/v3.7.0/Dockerfile b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/Dockerfile new file mode 100644 index 000000000..7bb761af4 --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.19 +FROM python:3.11.13-bookworm 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-debian12:latest@sha256:afdfc6df9eb96cf65576d4d59af48c4b5dac29ad62066aee879f12b303298aac AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-mypy_grpc" ] diff --git a/plugins/community/nipunn1313-mypy-grpc/v3.7.0/buf.plugin.yaml b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/buf.plugin.yaml new file mode 100644 index 000000000..603da9fbd --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/buf.plugin.yaml @@ -0,0 +1,26 @@ +version: v1 +name: buf.build/community/nipunn1313-mypy-grpc +plugin_version: v3.7.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/v3.7.0/LICENSE +output_languages: + - python +registry: + python: + package_type: "stub-only" + # https://github.com/nipunn1313/mypy-protobuf/blob/v3.7.0/setup.cfg#L20 + requires_python: ">=3.8" + deps: + # https://github.com/nipunn1313/mypy-protobuf/tree/v3.7.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf + # > Earlier releases might work, but aren't tested. + - "types-protobuf >= 5.28" + - "protobuf >= 5.28.2" + # https://github.com/nipunn1313/mypy-protobuf/tree/v3.7.0#to-run-typecheckers-on-code-generated-with-grpc-plugin---youll-additionally-need + # > Earlier releases might work, but aren't tested + - "grpcio >= 1.66.2" + # https://pypi.org/project/grpcio-tools/ + - "grpcio-tools >= 1.66.2" + # https://pypi.org/project/grpc-stubs/ + - "grpc-stubs >= 1.53.0.5" diff --git a/plugins/community/nipunn1313-mypy-grpc/v3.7.0/requirements.txt b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/requirements.txt new file mode 100644 index 000000000..996325e6c --- /dev/null +++ b/plugins/community/nipunn1313-mypy-grpc/v3.7.0/requirements.txt @@ -0,0 +1,3 @@ +mypy-protobuf==3.7.0 +protobuf==6.33.1 +types-protobuf==6.32.1.20251105 diff --git a/plugins/community/nipunn1313-mypy/v3.7.0/.dockerignore b/plugins/community/nipunn1313-mypy/v3.7.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v3.7.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/community/nipunn1313-mypy/v3.7.0/Dockerfile b/plugins/community/nipunn1313-mypy/v3.7.0/Dockerfile new file mode 100644 index 000000000..45fcdf103 --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v3.7.0/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.19 +FROM python:3.11.13-bookworm 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-debian12:latest@sha256:afdfc6df9eb96cf65576d4d59af48c4b5dac29ad62066aee879f12b303298aac AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT [ "/app/bin/protoc-gen-mypy" ] diff --git a/plugins/community/nipunn1313-mypy/v3.7.0/buf.plugin.yaml b/plugins/community/nipunn1313-mypy/v3.7.0/buf.plugin.yaml new file mode 100644 index 000000000..7aea8a80e --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v3.7.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/community/nipunn1313-mypy +plugin_version: v3.7.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/v3.7.0/LICENSE +output_languages: + - python +registry: + python: + package_type: "stub-only" + # https://github.com/nipunn1313/mypy-protobuf/blob/v3.7.0/setup.cfg#L20 + requires_python: ">=3.8" + deps: + # https://github.com/nipunn1313/mypy-protobuf/tree/v3.7.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf + # > Earlier releases might work, but aren't tested. + - "types-protobuf >= 5.28" + - "protobuf >= 5.28.2" diff --git a/plugins/community/nipunn1313-mypy/v3.7.0/requirements.txt b/plugins/community/nipunn1313-mypy/v3.7.0/requirements.txt new file mode 100644 index 000000000..996325e6c --- /dev/null +++ b/plugins/community/nipunn1313-mypy/v3.7.0/requirements.txt @@ -0,0 +1,3 @@ +mypy-protobuf==3.7.0 +protobuf==6.33.1 +types-protobuf==6.32.1.20251105 diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.7.0/eliza/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.7.0/eliza/plugin.sum new file mode 100644 index 000000000..1136966ab --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.7.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:BYBWcreiMNyJTziSDWALko0+It2W4rJ10gW7o7SFwt0= diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.7.0/petapis/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.7.0/petapis/plugin.sum new file mode 100644 index 000000000..f8a53f8c1 --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.7.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:1+ccsrCy1Elhcob9b7xjjzSeqcvX94svl2IgCvDssnM= diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy/v3.7.0/eliza/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy/v3.7.0/eliza/plugin.sum new file mode 100644 index 000000000..7149c9268 --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy/v3.7.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:X9Br5AwJToHrw6lu0ljbVl9wvpd4GpxrfFlCcC1B9iw= diff --git a/tests/testdata/buf.build/community/nipunn1313-mypy/v3.7.0/petapis/plugin.sum b/tests/testdata/buf.build/community/nipunn1313-mypy/v3.7.0/petapis/plugin.sum new file mode 100644 index 000000000..87dac1589 --- /dev/null +++ b/tests/testdata/buf.build/community/nipunn1313-mypy/v3.7.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:IEQlivL4185qyTk+yy9wL+KgEi+JCQ6XaWGXdrRT6s8=