From eec43fd660a08807c5ef6efd457c7916533e3c89 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sat, 27 Jan 2024 16:48:49 +0000 Subject: [PATCH 1/2] python311Packages.scs: relax floating point precision after the update to scipy 1.12 the test_solve_feasible fails on linux with 1 of the 185 floating point values not being equal to 4 decimal places. relax the check to only check 3 decimal places. --- pkgs/development/python-modules/scs/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/scs/default.nix b/pkgs/development/python-modules/scs/default.nix index 5e95bed4cbdb..5f7045cf8fab 100644 --- a/pkgs/development/python-modules/scs/default.nix +++ b/pkgs/development/python-modules/scs/default.nix @@ -41,6 +41,13 @@ buildPythonPackage rec { url = "https://github.com/bodono/scs-python/commit/dd17e2e5282ebe85f2df8a7c6b25cfdeb894970d.patch"; hash = "sha256-vSeSJeeu5Wx3RXPyB39YTo0RU8HtAojrUw85Q76/QzA="; }) + # fix test_solve_random_cone_prob on linux after scipy 1.12 update + # https://github.com/bodono/scs-python/pull/82 + (fetchpatch { + name = "scipy-1.12-fix.patch"; + url = "https://github.com/bodono/scs-python/commit/4baf4effdc2ce7ac2dd1beaf864f1a5292eb06c6.patch"; + hash = "sha256-U/F5MakwYZN5hCaeAkcCG38WQxX9mXy9OvhyEQqN038="; + }) ]; nativeBuildInputs = [ From de23b55767b1b5b91119615d9039264d3c885109 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Thu, 1 Feb 2024 02:17:49 +0000 Subject: [PATCH 2/2] python311Packages.scs: enable all tests --- pkgs/development/python-modules/scs/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/development/python-modules/scs/default.nix b/pkgs/development/python-modules/scs/default.nix index 5f7045cf8fab..c1ca83ed4ba1 100644 --- a/pkgs/development/python-modules/scs/default.nix +++ b/pkgs/development/python-modules/scs/default.nix @@ -69,12 +69,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "scs" ]; - disabledTests = lib.lists.optional (stdenv.system == "x86_64-linux") [ - # `test/test_scs_rand.py` hang on "x86_64-linux" (https://github.com/NixOS/nixpkgs/pull/244532#pullrequestreview-1598095858) - "test_feasible" - "test_infeasibl" - "test_unbounded" - ]; meta = with lib; { description = "Python interface for SCS: Splitting Conic Solver";