Unverified Commit 727314ed authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

python3Packages.protobuf: check version compatibility

Let's avoid situations from #459656 early, e.g. log
https://hydra.nixos.org/build/312538974/nixlog/1/tail

Note that python3Packages.protobuf is in protobuf.tests,
so that we should notice when updating protobuf in particular.
parent ba3de85b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -23,8 +23,12 @@ buildPythonPackage rec {
    protobuf
  ];

  doCheck =
    # https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards
    # The non-python protobuf provides the protoc binary which must not be newer.
    assert lib.versionAtLeast version ("6." + protobuf.version);
    # the pypi source archive does not ship tests
  doCheck = false;
    false;

  pythonImportsCheck = [
    "google.protobuf"
@@ -45,7 +49,9 @@ buildPythonPackage rec {
  meta = {
    description = "Protocol Buffers are Google's data interchange format";
    homepage = "https://developers.google.com/protocol-buffers/";
    changelog = "https://github.com/protocolbuffers/protobuf/releases/v${version}";
    changelog = "https://github.com/protocolbuffers/protobuf/releases/v${
      builtins.substring 2 (-1) version
    }";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };