From 60ee4ed17a5e9df022a2e95121589ad77d6fd1cc Mon Sep 17 00:00:00 2001 From: Harinn Date: Mon, 18 May 2026 14:27:17 +0700 Subject: [PATCH] python3Packages.trectools: skip testtreceval.py for numpy 2 compatibility --- .../python-modules/trectools/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/trectools/default.nix b/pkgs/development/python-modules/trectools/default.nix index b626e5d2bef1..8ac9550f2076 100644 --- a/pkgs/development/python-modules/trectools/default.nix +++ b/pkgs/development/python-modules/trectools/default.nix @@ -46,14 +46,19 @@ buildPythonPackage { sarge ]; - unittestFlagsArray = [ - "unittests/" - ]; - nativeCheckInputs = [ unittestCheckHook ]; + preCheck = '' + # tests pass numpy arrays to float(), which numpy 2 rejects + rm unittests/testtreceval.py + ''; + + unittestFlagsArray = [ + "unittests/" + ]; + pythonImportsCheck = [ "trectools" ]; meta = {