app-text/OCRmyPDF: add 16.13.0, drop 16.10.2

Add Python 3.14 support which is officially part of the test matrix since release 16.2.0.

Signed-off-by: Gilles Dartiguelongue <gilles.dartiguelongue@esiee.org>
Part-of: https://github.com/gentoo/guru/pull/533
Closes: https://github.com/gentoo/guru/pull/533
Signed-off-by: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
This commit is contained in:
Gilles Dartiguelongue authored and Thomas Bracht Laumann Jespersen committed 2026-08-28 06:09:06 +02:00
1 parent d083a607eb
commit 17f5db6432
4 files changed
+3 -139

No files matched your search

+1 -1
View File
@@ -1 +1 @@
DIST ocrmypdf-16.10.2.tar.gz 6996190 BLAKE2B 129897cf83748c6f8d2e5947e547a622eee3a5279772a03402b9d99918be085dc05f5fd647ad2822e6d0cbf3cfa9467ea3660b15dc86f007da7d5e4a12518341 SHA512 28c5c72df765eecd8d7d82a8b92459c8229ac88ce70590c0ee1ca2862a87e518f00805b23befe41ed71c5f99311ac81e5b7638e71553d52bf80f46ab0529578b
DIST ocrmypdf-16.13.0.tar.gz 7042247 BLAKE2B 8799f72b67360d337a9e5cd8cdcdadd3f52656ca64491a76f6b76436a71f55e226803f11cfd30d914ffc7d5d6d8fd40b363ab5dbccb7e741094bdd7f4575a08f SHA512 133918703c0403a4ee5b9e2e7236b2bbebf9714d8558d2f7b80c63d332ea881e5bfc4bd6a3fecafb52888098b2e69a0067b4fb6ef2d7b6910dd533fcc35af467
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{12..13} )
PYTHON_COMPAT=( python3_{12..14} )
inherit distutils-r1 optfeature pypi shell-completion
@@ -21,7 +21,7 @@ RDEPEND="
>=app-text/tesseract-4.1.1[jpeg,tiff,png,webp]
>=dev-python/deprecation-2.1.0[${PYTHON_USEDEP}]
>=dev-python/packaging-20[${PYTHON_USEDEP}]
>=dev-python/pikepdf-8.10.1[${PYTHON_USEDEP}]
>=dev-python/pikepdf-10.0.0[${PYTHON_USEDEP}]
>=dev-python/pillow-10.0.1[jpeg2k,lcms,${PYTHON_USEDEP}]
>=dev-python/pluggy-1.0[${PYTHON_USEDEP}]
>=dev-python/rich-13.0[${PYTHON_USEDEP}]
@@ -41,8 +41,6 @@ BDEPEND="
"
PATCHES=(
"${FILESDIR}"/${PN}-16.10.2-suppress-runtime-error.patch
"${FILESDIR}"/${PN}-16.10.2-xfail-tests.patch
)
EPYTEST_PLUGINS=( hypothesis )
@@ -54,9 +52,6 @@ EPYTEST_IGNORE=(
EPYTEST_DESELECT=(
# Fails if Tesseract was compiled with Clang
tests/test_rotation.py::test_rotate_deskew_ocr_timeout
# XFAIL reason should be a string, not a tuple
tests/test_metadata.py::test_malformed_docinfo
)
distutils_enable_tests pytest
@@ -1,50 +0,0 @@
From 332369f1b0b794577ac0bfcd4928bcc7a169689d Mon Sep 17 00:00:00 2001
From: "James R. Barlow" <james@purplerock.ca>
Date: Fri, 13 Jun 2025 01:22:01 -0700
Subject: [PATCH 1/2] Adjust set_start_method decision, changing fork to
forkserver for platforms other than win32, darwin
---
src/ocrmypdf/__main__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ocrmypdf/__main__.py b/src/ocrmypdf/__main__.py
index cec02d13..29171fe1 100755
--- a/src/ocrmypdf/__main__.py
+++ b/src/ocrmypdf/__main__.py
@@ -78,6 +78,6 @@ def run(args=None):
if __name__ == '__main__':
multiprocessing.freeze_support()
- if os.name == 'posix':
+ if sys.platform not in ('win32', 'darwin'):
multiprocessing.set_start_method('forkserver')
sys.exit(run())
--
2.50.0
From 61163c2aa9f7aa584d3148634a9ca277103eccbf Mon Sep 17 00:00:00 2001
From: "James R. Barlow" <james@purplerock.ca>
Date: Fri, 13 Jun 2025 01:46:30 -0700
Subject: [PATCH 2/2] Fix stupid Python runtimeerror
---
src/ocrmypdf/__main__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ocrmypdf/__main__.py b/src/ocrmypdf/__main__.py
index 29171fe1..74a035ef 100755
--- a/src/ocrmypdf/__main__.py
+++ b/src/ocrmypdf/__main__.py
@@ -79,5 +79,6 @@ def run(args=None):
if __name__ == '__main__':
multiprocessing.freeze_support()
if sys.platform not in ('win32', 'darwin'):
- multiprocessing.set_start_method('forkserver')
+ with suppress(RuntimeError):
+ multiprocessing.set_start_method('forkserver')
sys.exit(run())
--
2.50.0
@@ -1,81 +0,0 @@
From 633d59b94f702eb36d51ea3e6a8285b64e7cf710 Mon Sep 17 00:00:00 2001
From: "James R. Barlow" <james@purplerock.ca>
Date: Thu, 3 Jul 2025 09:21:31 -0700
Subject: [PATCH 1/2] xfail Python logging bug in 3.13.3/4
---
tests/test_ghostscript.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/test_ghostscript.py b/tests/test_ghostscript.py
index 1a511c44..1ddd07cb 100644
--- a/tests/test_ghostscript.py
+++ b/tests/test_ghostscript.py
@@ -6,6 +6,7 @@ from __future__ import annotations
import logging
import secrets
import subprocess
+import sys
from decimal import Decimal
from unittest.mock import patch
@@ -163,6 +164,10 @@ class TestDuplicateFilter:
logger.addFilter(DuplicateFilter(logger))
return logger
+ @pytest.mark.xfail(
+ (3, 13, 3) <= sys.version_info <= (3, 13, 5),
+ reason="https://github.com/python/cpython/pull/135858",
+ )
def test_filter_duplicate_messages(self, duplicate_filter_logger, caplog):
log = duplicate_filter_logger
log.error("test error message")
@@ -192,6 +197,10 @@ class TestDuplicateFilter:
assert caplog.records[1].msg == "another error message"
assert caplog.records[2].msg == "yet another error message"
+ @pytest.mark.xfail(
+ (3, 13, 3) <= sys.version_info <= (3, 13, 5),
+ reason="https://github.com/python/cpython/pull/135858",
+ )
def test_filter_alt_messages(self, duplicate_filter_logger, caplog):
log = duplicate_filter_logger
log.error("test error message")
--
2.50.0
From 664dffb9d7843c42acc8a7c5889f722872de0f9a Mon Sep 17 00:00:00 2001
From: "James R. Barlow" <james@purplerock.ca>
Date: Thu, 3 Jul 2025 11:30:05 -0700
Subject: [PATCH 2/2] Fix version test
---
tests/test_ghostscript.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_ghostscript.py b/tests/test_ghostscript.py
index 1ddd07cb..417badaf 100644
--- a/tests/test_ghostscript.py
+++ b/tests/test_ghostscript.py
@@ -165,7 +165,7 @@ class TestDuplicateFilter:
return logger
@pytest.mark.xfail(
- (3, 13, 3) <= sys.version_info <= (3, 13, 5),
+ (3, 13, 3) <= sys.version_info[:3] <= (3, 13, 5),
reason="https://github.com/python/cpython/pull/135858",
)
def test_filter_duplicate_messages(self, duplicate_filter_logger, caplog):
@@ -198,7 +198,7 @@ class TestDuplicateFilter:
assert caplog.records[2].msg == "yet another error message"
@pytest.mark.xfail(
- (3, 13, 3) <= sys.version_info <= (3, 13, 5),
+ (3, 13, 3) <= sys.version_info[:3] <= (3, 13, 5),
reason="https://github.com/python/cpython/pull/135858",
)
def test_filter_alt_messages(self, duplicate_filter_logger, caplog):
--
2.50.0