Skip to content

Commit

Permalink
python312Packages.{etcd3,limits}: fix build (NixOS#351570)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa authored Oct 29, 2024
2 parents 105becb + 2aafc11 commit 0c9fe11
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
19 changes: 14 additions & 5 deletions pkgs/development/python-modules/etcd3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
pytestCheckHook,
six,
tenacity,
setuptools,
}:

buildPythonPackage rec {
pname = "etcd3";
version = "0.12.0";
format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "kragniz";
Expand All @@ -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
Expand All @@ -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 ];
};
}
6 changes: 6 additions & 0 deletions pkgs/development/python-modules/limits/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 0c9fe11

Please sign in to comment.