python312Packages.protobuf5: init at 5.27.2

in 5.XX.X the setup.py we used before from the repo got moved and the
pypi source distribution doesn't seemingly require any packages to
compile or supports the cpp implementation flag.

see 5722aeffca
for more details
This commit is contained in:
Sandro Jäckel 2024-07-26 19:59:38 +02:00
parent b79c8acabc
commit 522b294896
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,39 @@
{
buildPythonPackage,
fetchPypi,
lib,
setuptools,
}:
buildPythonPackage rec {
pname = "protobuf";
version = "5.27.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-8+ze8ia5r4VgdfKCJ/8skM46WU0JLDm+5VE1c/JeJxQ=";
};
build-system = [ setuptools ];
# the pypi source archive does not ship tests
doCheck = false;
pythonImportsCheck = [
"google.protobuf"
"google.protobuf.compiler"
"google.protobuf.internal"
"google.protobuf.pyext"
"google.protobuf.testdata"
"google.protobuf.util"
"google._upb._message"
];
meta = with lib; {
description = "Protocol Buffers are Google's data interchange format";
homepage = "https://developers.google.com/protocol-buffers/";
license = licenses.bsd3;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -10691,6 +10691,9 @@ self: super: with self; {
protobuf = pkgs.protobuf;
};
# Protobuf 5.x
protobuf5 = callPackage ../development/python-modules/protobuf/default.nix { };
# If a protobuf upgrade causes many Python packages to fail, please pin it here to the previous version.
protobuf = protobuf4;