Unverified Commit c5496c1c authored by Yt's avatar Yt Committed by GitHub
Browse files

python313Packages.docling: 2.43.0 -> 2.47.1; fix build (#436319)

parents 53b28c2d 6e17d156
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,14 +29,14 @@

buildPythonPackage rec {
  pname = "docling-core";
  version = "2.44.2";
  version = "2.45.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "docling-project";
    repo = "docling-core";
    tag = "v${version}";
    hash = "sha256-CLPJYt3P6DUt0lQQOQ54vXPJcoi3Kyq7eZ6OwjGkmGk=";
    hash = "sha256-9gTGC5jATmiYNrYXWb3KCBvaa/7H5ienUSQ+wBefwdQ=";
  };

  build-system = [
+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"
+6 −2
Original line number Diff line number Diff line
@@ -52,14 +52,14 @@

buildPythonPackage rec {
  pname = "docling";
  version = "2.43.0";
  version = "2.47.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "docling-project";
    repo = "docling";
    tag = "v${version}";
    hash = "sha256-fMLED97DhfHp74GVDtdPXrJvfpKw6bOvQAaGTWZrPyE=";
    hash = "sha256-U82hGvWXkKwZ4um0VevVoYiIfzswu5hLDYvxtqJqmHU=";
  };

  build-system = [
@@ -101,6 +101,8 @@ buildPythonPackage rec {
  ];

  pythonRelaxDeps = [
    "lxml"
    "pypdfium2"
    "pillow"
  ];

@@ -167,6 +169,8 @@ buildPythonPackage rec {
    "test_confidence"
    "test_e2e_webp_conversions"
    "test_asr_pipeline_conversion"
    "test_threaded_pipeline"
    "test_pipeline_comparison"

    # AssertionError: pred_itxt==true_itxt
    "test_e2e_valid_csv_conversions"