mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
python3Packages.protobuf-py: init at 0.1.1
Buf's idiomatic Protocol Buffers runtime for Python, required by connectrpc and the E2B Python SDK. Fetched from PyPI because upstream has no tag for this release; its only tag is v0.2.0, which neither connectrpc nor e2b accepts yet. Assisted-by: Claude Code (Claude Opus 5)
This commit is contained in:
51
pkgs/development/python-modules/protobuf-py/default.nix
Normal file
51
pkgs/development/python-modules/protobuf-py/default.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
|
||||
# build-system
|
||||
uv-build,
|
||||
|
||||
# dependencies
|
||||
protobuf-py-ext,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "protobuf-py";
|
||||
# connectrpc requires this exact version and e2b requires <0.2; bump all three
|
||||
# together.
|
||||
version = "0.1.1";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
# No tag on GitHub for this release: bufbuild/protobuf-py's only tag is v0.2.0,
|
||||
# which connectrpc (`protobuf-py==0.1.1`) and e2b (`<0.2`) do not accept yet.
|
||||
src = fetchPypi {
|
||||
pname = "protobuf_py";
|
||||
inherit (finalAttrs) version;
|
||||
hash = "sha256-a9CKxNjxZhllu+JoVCnXkENwTN0e5yCnqJYXMxdCJAs=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
uv-build
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
protobuf-py-ext
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "protobuf" ];
|
||||
|
||||
# The test suite is not part of the PyPI sdist and there is no git tag for this
|
||||
# release. Note that protobuf swallows an ImportError from protobuf_ext and
|
||||
# falls back to pure Python, so a broken accelerator would not surface here —
|
||||
# protobuf-py-ext's own pythonImportsCheck is what guards that.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Idiomatic Protocol Buffers for Python";
|
||||
homepage = "https://github.com/bufbuild/protobuf-py";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ mishushakov ];
|
||||
};
|
||||
})
|
||||
@@ -13663,6 +13663,8 @@ self: super: with self; {
|
||||
# If a protobuf upgrade causes many Python packages to fail, please pin it here to the previous version.
|
||||
protobuf = protobuf7;
|
||||
|
||||
protobuf-py = callPackage ../development/python-modules/protobuf-py { };
|
||||
|
||||
protobuf-py-ext = callPackage ../development/python-modules/protobuf-py-ext { };
|
||||
|
||||
protobuf3-to-dict = callPackage ../development/python-modules/protobuf3-to-dict { };
|
||||
|
||||
Reference in New Issue
Block a user