From 810209c2176416a6718e6bf7dc2f460eefce01b3 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 19 Jan 2026 09:53:55 +0000 Subject: [PATCH] python3Packages.compressai: skip failing tests on python>=3.14 --- .../python-modules/compressai/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/compressai/default.nix b/pkgs/development/python-modules/compressai/default.nix index 6e453e9488e7..e56ce6e7f05c 100644 --- a/pkgs/development/python-modules/compressai/default.nix +++ b/pkgs/development/python-modules/compressai/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system pybind11, @@ -31,7 +32,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "compressai"; version = "1.2.8"; pyproject = true; @@ -39,9 +40,9 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "InterDigitalInc"; repo = "CompressAI"; - tag = "v${version}"; - hash = "sha256-Fgobh7Q1rKomcqAT4kJl2RsM1W13ErO8sFB2urCqrCk="; + tag = "v${finalAttrs.version}"; fetchSubmodules = true; + hash = "sha256-Fgobh7Q1rKomcqAT4kJl2RsM1W13ErO8sFB2urCqrCk="; }; build-system = [ @@ -100,6 +101,12 @@ buildPythonPackage rec { # Flaky (AssertionError: assert 0.08889999999999998 < 0.064445) "test_compiling" "test_find_close" + ] + ++ lib.optionals (pythonAtLeast "3.14") [ + # AttributeError: '...' object has no attribute '__annotations__' + "test_gdn" + "test_gdn1" + "test_lower_bound_script" ]; disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ @@ -117,4 +124,4 @@ buildPythonPackage rec { license = lib.licenses.bsd3Clear; maintainers = with lib.maintainers; [ GaetanLepage ]; }; -} +})