From ba9d965d7d3aa34494651768bc359357f37a7cf1 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 27 Oct 2024 17:47:38 +0800 Subject: [PATCH 1/2] python312Packages.etcd3: fix build --- .../python-modules/etcd3/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/etcd3/default.nix b/pkgs/development/python-modules/etcd3/default.nix index e105afb48ae48..366306d6302cd 100644 --- a/pkgs/development/python-modules/etcd3/default.nix +++ b/pkgs/development/python-modules/etcd3/default.nix @@ -11,12 +11,13 @@ pytestCheckHook, six, tenacity, + setuptools, }: buildPythonPackage rec { pname = "etcd3"; version = "0.12.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "kragniz"; @@ -25,7 +26,15 @@ buildPythonPackage rec { hash = "sha256-YM72+fkCDYXl6DORJa/O0sqXqHDWQcFLv2ifQ9kEHBo="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + env = { + # make protobuf compatible with old versions + # https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; + }; + + dependencies = [ grpcio protobuf six @@ -49,10 +58,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "etcd3" ]; - meta = with lib; { + meta = { description = "Python client for the etcd API v3"; homepage = "https://github.com/kragniz/python-etcd3"; - license = licenses.asl20; - maintainers = [ ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ moraxyc ]; }; } From 2aafc1197f04acc0db00c2166f9c9b4608408591 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 27 Oct 2024 17:48:14 +0800 Subject: [PATCH 2/2] python312Packages.limits: fix build --- pkgs/development/python-modules/limits/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index b7b634d38b1e8..d1f78b740643e 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -90,6 +90,12 @@ buildPythonPackage rec { async-etcd = [ aetcd ]; }; + env = { + # make protobuf compatible with old versions + # https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; + }; + doCheck = pythonOlder "3.12"; # SystemError in protobuf nativeCheckInputs = [