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 https://github.com/protocolbuffers/protobuf/commit/5722aeffcad72e9a335a3ec7985858dfa31477be
for more details
This commit is contained in:
Sandro Jäckel
2024-07-26 20:03:19 +02:00
parent b79c8acabc
commit 522b294896
2 changed files with 42 additions and 0 deletions
@@ -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 ];
};
}
+3
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;