From 3a122b21d8c61f44dcbddce5eaf4ffc63e348ba0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 24 Mar 2025 22:46:37 +0100 Subject: [PATCH 1/3] python312Packages.docling-ibm-models: relax jsonlines dependency --- pkgs/development/python-modules/docling-ibm-models/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/docling-ibm-models/default.nix b/pkgs/development/python-modules/docling-ibm-models/default.nix index 38137792b16c..7fecf2023d0d 100644 --- a/pkgs/development/python-modules/docling-ibm-models/default.nix +++ b/pkgs/development/python-modules/docling-ibm-models/default.nix @@ -58,8 +58,9 @@ buildPythonPackage rec { ]; pythonRelaxDeps = [ - "transformers" + "jsonlines" "numpy" + "transformers" ]; pythonImportsCheck = [ From b109774a10da1aa5738db703a87f17edee2d6936 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 24 Mar 2025 23:01:24 +0100 Subject: [PATCH 2/3] python312Packages.docling-ibm-models: skip failing tests on darwin --- .../python-modules/docling-ibm-models/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/docling-ibm-models/default.nix b/pkgs/development/python-modules/docling-ibm-models/default.nix index 7fecf2023d0d..069d29cb6a0e 100644 --- a/pkgs/development/python-modules/docling-ibm-models/default.nix +++ b/pkgs/development/python-modules/docling-ibm-models/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -82,6 +83,12 @@ buildPythonPackage rec { "test_tf_predictor" ]; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ + # No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package + "tests/test_code_formula_predictor.py" + "tests/test_layout_predictor.py" + ]; + meta = { changelog = "https://github.com/DS4SD/docling-ibm-models/blob/${src.tag}/CHANGELOG.md"; description = "Docling IBM models"; From e05c24f19f11bb03d049949b10cea3120fc22ef9 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 24 Mar 2025 23:12:39 +0100 Subject: [PATCH 3/3] python312Packages.docling: skip failing tests on darwin --- .../python-modules/docling/default.nix | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/development/python-modules/docling/default.nix b/pkgs/development/python-modules/docling/default.nix index 21df13d97842..9e792da7e8de 100644 --- a/pkgs/development/python-modules/docling/default.nix +++ b/pkgs/development/python-modules/docling/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -160,6 +161,25 @@ buildPythonPackage rec { "test_e2e_valid_csv_conversions" ]; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ + # No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package + "tests/test_backend_csv.py" + "tests/test_backend_html.py" + "tests/test_backend_jats.py" + "tests/test_backend_msexcel.py" + "tests/test_backend_msword.py" + "tests/test_backend_pptx.py" + "tests/test_cli.py" + "tests/test_code_formula.py" + "tests/test_document_picture_classifier.py" + "tests/test_e2e_conversion.py" + "tests/test_e2e_ocr_conversion.py" + "tests/test_interfaces.py" + "tests/test_invalid_input.py" + "tests/test_legacy_format_transform.py" + "tests/test_options.py" + ]; + meta = { description = "Get your documents ready for gen AI"; homepage = "https://github.com/DS4SD/docling";