From 2d2dea1980dd3da656ab516137246831af476c8b Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 23 Aug 2025 20:37:30 -0400 Subject: [PATCH] python313Packages.docling-parse: 4.1.0 -> 4.2.3 --- .../python-modules/docling-parse/default.nix | 22 +++++++++---------- .../docling-parse/test_parse.patch | 20 ----------------- 2 files changed, 10 insertions(+), 32 deletions(-) delete mode 100644 pkgs/development/python-modules/docling-parse/test_parse.patch diff --git a/pkgs/development/python-modules/docling-parse/default.nix b/pkgs/development/python-modules/docling-parse/default.nix index 990083f9d54d..0b78e4272e7d 100644 --- a/pkgs/development/python-modules/docling-parse/default.nix +++ b/pkgs/development/python-modules/docling-parse/default.nix @@ -5,7 +5,7 @@ cmake, pkg-config, cxxopts, - poetry-core, + setuptools, pybind11, zlib, nlohmann_json, @@ -23,24 +23,16 @@ buildPythonPackage rec { pname = "docling-parse"; - version = "4.1.0"; + version = "4.2.3"; pyproject = true; src = fetchFromGitHub { owner = "docling-project"; repo = "docling-parse"; tag = "v${version}"; - hash = "sha256-1vl5Ij25NXAwhoXLJ35lcr5r479jrdKd9DxWhYbCApw="; + hash = "sha256-0X9fP2PiHjZs+RT+VngHvNt4U0zpXq09BnaO/5tpfY8="; }; - patches = [ - # Fixes test_parse unit tests - # export_to_textlines in docling-core >= 2.38.2 includes text direction - # by default, which is not included in upstream's groundtruth data. - # TODO: remove when docling-core version gets bumped in upstream's uv.lock - ./test_parse.patch - ]; - dontUseCmakeConfigure = true; nativeBuildInputs = [ @@ -49,7 +41,7 @@ buildPythonPackage rec { ]; build-system = [ - poetry-core + setuptools ]; env.NIX_CFLAGS_COMPILE = "-I${lib.getDev utf8cpp}/include/utf8cpp"; @@ -83,6 +75,12 @@ buildPythonPackage rec { "pillow" ]; + # Listed as runtime dependencies but only used in CI to build wheels + preBuild = '' + sed -i '/cibuildwheel/d' pyproject.toml + sed -i '/delocate/d' pyproject.toml + ''; + pythonImportsCheck = [ "docling_parse" ]; diff --git a/pkgs/development/python-modules/docling-parse/test_parse.patch b/pkgs/development/python-modules/docling-parse/test_parse.patch deleted file mode 100644 index f58c78dcad0b..000000000000 --- a/pkgs/development/python-modules/docling-parse/test_parse.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/tests/test_parse.py b/tests/test_parse.py -index 84e17ae..e1eb6ae 100644 ---- a/tests/test_parse.py -+++ b/tests/test_parse.py -@@ -242,6 +242,7 @@ def test_reference_documents_from_filenames(): - cell_unit=unit, - add_fontkey=True, - add_fontname=False, -+ add_text_direction=False, - ) - _fname = fname + f".{unit}.txt" - with open(_fname, "w") as fw: -@@ -254,6 +255,7 @@ def test_reference_documents_from_filenames(): - cell_unit=unit, - add_fontkey=True, - add_fontname=False, -+ add_text_direction=False, - ) - - _fname = fname + f".{unit}.txt"