Commit 2d2dea19 authored by Ihar Hrachyshka's avatar Ihar Hrachyshka
Browse files

python313Packages.docling-parse: 4.1.0 -> 4.2.3

parent 607afb76
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -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"
  ];
+0 −20
Original line number Diff line number Diff line
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"