• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 22112345810

17 Feb 2026 07:20PM UTC coverage: 80.35%. First build
22112345810

Pull #23019

github

web-flow
Merge 6a191ffb3 into f7d37c4f2
Pull Request #23019: switch to "protoc-gen-grpc-python-prebuilt" for the grpc-python-plugin

6 of 9 new or added lines in 2 files covered. (66.67%)

78786 of 98053 relevant lines covered (80.35%)

3.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/src/python/pants/backend/codegen/protobuf/python/grpc_python_plugin.py
1
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from pants.core.util_rules.external_tool import ExternalTool
7✔
5
from pants.engine.platform import Platform
7✔
6

7

8
class GrpcPythonPlugin(ExternalTool):
7✔
9
    options_scope = "grpc-python-plugin"
7✔
10
    help = "The gRPC Protobuf plugin for Python."
7✔
11

12
    # https://github.com/nhurden/protoc-gen-grpc-python-prebuilt maintains a
13
    # composite versioning strategy with both the grpc plugin version and the
14
    # version of "protoc-gen-grpc-python-prebuilt" that built it
15
    default_version = "v0.3.1+v1.73.1"
7✔
16
    default_known_versions = [
7✔
17
        "v0.3.1+v1.73.1|linux_arm64 |aa7730e447a829f61ed0da9b9c0974d56fba8984806ac4a4d984da0c998f1a3d|14536184",
18
        "v0.3.1+v1.73.1|linux_x86_64|17952bf233ed86841c15a454a378cc4ef78f2610313c3159d3e58f987ba5f656|13874656",
19
        "v0.3.1+v1.73.1|macos_arm64 |7cb578b187eb959402cf3434699dffda0f46c4380baa5648e1e75fc9440d3d12|32170440",
20
        "v0.3.1+v1.73.1|macos_x86_64|7cb578b187eb959402cf3434699dffda0f46c4380baa5648e1e75fc9440d3d12|32170440",
21
        # Old versions from binaries.pantsbuild.org
22
        "1.32.0|macos_arm64 |b2db586656463841aa2fd4aab34fb6bd3ef887b522d80e4f2f292146c357f533|6215304|https://binaries.pantsbuild.org/bin/grpc_python_plugin/1.32.0/macos/x86_64/grpc_python_plugin",
23
        "1.32.0|macos_x86_64|b2db586656463841aa2fd4aab34fb6bd3ef887b522d80e4f2f292146c357f533|6215304|https://binaries.pantsbuild.org/bin/grpc_python_plugin/1.32.0/macos/x86_64/grpc_python_plugin",
24
        "1.32.0|linux_arm64 |9365e728c603d64735963074340994245d324712344f63557ef3630864dd9f52|5233664|https://binaries.pantsbuild.org/bin/grpc_python_plugin/1.32.0/linux/arm64/grpc_python_plugin",
25
        "1.32.0|linux_x86_64|1af99df9bf733c17a75cbe379f3f9d9ff1627d8a8035ea057c3c78575afe1687|4965728|https://binaries.pantsbuild.org/bin/grpc_python_plugin/1.32.0/linux/x86_64/grpc_python_plugin",
26
    ]
27

28
    def generate_url(self, plat: Platform) -> str:
7✔
NEW
29
        prebuilt_version, grpc_version = self.version.split("+")
×
NEW
30
        plat_str = {
×
31
            "macos_arm64": "macos-universal",
32
            "macos_x86_64": "macos-universal",
33
            "linux_arm64": "linux-aarch64",
34
            "linux_x86_64": "linux-x86_64",
35
        }[plat.value]
36

NEW
37
        return f"https://github.com/nhurden/protoc-gen-grpc-python-prebuilt/releases/download/{prebuilt_version}/protoc-gen-grpc-python-{plat_str}-{grpc_version}"
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc