From cddcb2a4f133d25684968c9140b23ce922830b64 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 20 Apr 2024 23:08:03 +0200 Subject: [PATCH] python312Packages.avro: ubreak --- pkgs/development/python-modules/avro/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/avro/default.nix b/pkgs/development/python-modules/avro/default.nix index b023936e4314..21246fae4743 100644 --- a/pkgs/development/python-modules/avro/default.nix +++ b/pkgs/development/python-modules/avro/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , pythonOlder +, setuptools , fetchPypi , typing-extensions , pytestCheckHook @@ -9,7 +10,7 @@ buildPythonPackage rec { pname = "avro"; version = "1.11.3"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -18,10 +19,19 @@ buildPythonPackage rec { hash = "sha256-M5O7UTn5zweR0gV1bOHjmltYWGr1sVPWo7WhmWEOnRc="; }; + postPatch = lib.optionalString (!pythonOlder "3.12") '' + substituteInPlace avro/test/test_tether_word_count.py \ + --replace-fail 'distutils' 'setuptools._distutils' + ''; + propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ typing-extensions ]; + nativeBuildInputs = [ + setuptools + ]; + nativeCheckInputs = [ pytestCheckHook ];