python3Packages.docling-jobkit: 1.2.0 -> 1.5.0

This commit is contained in:
codgician
2025-09-11 14:01:30 +08:00
parent 68102efd29
commit 77a88712d3
2 changed files with 18 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
{ {
lib, lib,
stdenv,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
@@ -18,32 +19,26 @@
httpx, httpx,
# optional dependencies # optional dependencies
tesserocr,
rapidocr,
onnxruntime,
ray, ray,
rq,
msgpack,
# tests # tests
pytestCheckHook, pytestCheckHook,
pytest-asyncio, pytest-asyncio,
writableTmpDirAsHomeHook, writableTmpDirAsHomeHook,
# options
withTesserocr ? false,
withRapidocr ? false,
withRay ? false,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "docling-jobkit"; pname = "docling-jobkit";
version = "1.2.0"; version = "1.5.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "docling-project"; owner = "docling-project";
repo = "docling-jobkit"; repo = "docling-jobkit";
tag = "v${version}"; tag = "v${version}";
hash = "sha256-bLLcMbN6GNpZ8U5Fhyq/XaHawOFcrFrobY7Jtpdm8Qo="; hash = "sha256-/rFMP5KiWHBsGaA2LVOWP2TkJLVeguIlrmO+JL610hQ=";
}; };
build-system = [ build-system = [
@@ -60,18 +55,14 @@ buildPythonPackage rec {
fastparquet fastparquet
pyarrow pyarrow
httpx httpx
] ];
++ lib.optionals withTesserocr optional-dependencies.tesserocr
++ lib.optionals withRapidocr optional-dependencies.rapidocr
++ lib.optionals withRay optional-dependencies.ray;
optional-dependencies = { optional-dependencies = {
tesserocr = [ tesserocr ];
rapidocr = [
rapidocr
onnxruntime
];
ray = [ ray ]; ray = [ ray ];
rq = [
rq
msgpack
];
}; };
pythonRelaxDeps = [ pythonRelaxDeps = [
@@ -89,14 +80,18 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
pytest-asyncio pytest-asyncio
writableTmpDirAsHomeHook writableTmpDirAsHomeHook
]; ]
++ optional-dependencies.rq;
disabledTests = [ disabledTests = [
# requires network access # requires network access
"test_convert_url" "test_chunk_file"
"test_convert_file" "test_convert_file"
"test_convert_warmup" "test_convert_warmup"
"test_convert_url"
"test_replicated_convert"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Flaky due to comparison with magic object # Flaky due to comparison with magic object
# https://github.com/docling-project/docling-jobkit/issues/45 # https://github.com/docling-project/docling-jobkit/issues/45
"test_options_validator" "test_options_validator"

View File

@@ -57,7 +57,7 @@ buildPythonPackage rec {
dependencies = [ dependencies = [
docling docling
(docling-jobkit.override { inherit withTesserocr withRapidocr; }) docling-jobkit
docling-mcp docling-mcp
fastapi fastapi
httpx httpx