From b58acc49df2e614f4e614b267511248aaa1603423f0653bb17073f807562cdc8 Mon Sep 17 00:00:00 2001 From: Mia Herkt Date: Fri, 17 Mar 2023 22:14:14 +0000 Subject: [PATCH] - Update to 2.6.0 * _pix_to_image now works with binary images gh#sirfz/tesserocr#274 * SetImage with alpha channels support gh#sirfz/tesserocr#280 * Leptonica 1.83.0 support gh#sirfz/tesserocr#306 * Pointsize should be returned even if fontname doesn't exist gh#sirfz/tesserocr#308 * Added Python 3.10, 3.11 setup classifiers - Drop 1441bec703cf68161acce5e85907ddd71c47fdc3.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tesserocr?expand=0&rev=32 --- ...bec703cf68161acce5e85907ddd71c47fdc3.patch | 31 ------------------- python-tesserocr.changes | 15 +++++++++ python-tesserocr.spec | 4 +-- tesserocr-2.5.2.tar.gz | 3 -- tesserocr-2.6.0.tar.gz | 3 ++ 5 files changed, 19 insertions(+), 37 deletions(-) delete mode 100644 1441bec703cf68161acce5e85907ddd71c47fdc3.patch delete mode 100644 tesserocr-2.5.2.tar.gz create mode 100644 tesserocr-2.6.0.tar.gz diff --git a/1441bec703cf68161acce5e85907ddd71c47fdc3.patch b/1441bec703cf68161acce5e85907ddd71c47fdc3.patch deleted file mode 100644 index edeb124..0000000 --- a/1441bec703cf68161acce5e85907ddd71c47fdc3.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1441bec703cf68161acce5e85907ddd71c47fdc3 Mon Sep 17 00:00:00 2001 -From: Stefan Weil -Date: Mon, 18 Jul 2022 08:09:15 +0200 -Subject: [PATCH] Add support for upcoming Leptonica 1.83.0 - -Signed-off-by: Stefan Weil ---- - tesseract5.pxd | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/tesseract5.pxd b/tesseract5.pxd -index 21ad667..aa7e52d 100644 ---- a/tesseract5.pxd -+++ b/tesseract5.pxd -@@ -54,6 +54,16 @@ cdef extern from "leptonica/allheaders.h" nogil: - L_SEVERITY_ERROR = 5 # Print error and higher messages - L_SEVERITY_NONE = 6 # Highest severity: print no messages - -+cdef extern from *: -+ """ -+ #if (LIBLEPT_MAJOR_VERSION > 1) || (LIBLEPT_MINOR_VERSION > 82) -+ // The public API of Leptonica 1.83.0 hides details of some data -+ // structures which are used by tesserocr (see Pix, Box, ... above). -+ // Get those details by including a private header file. -+ #include -+ #endif -+ """ -+ - cdef extern from "tesseract/publictypes.h" namespace "tesseract" nogil: - cdef enum PolyBlockType: - PT_UNKNOWN # Type is not yet known. Keep as the first element. diff --git a/python-tesserocr.changes b/python-tesserocr.changes index dfe80ce..bae4d22 100644 --- a/python-tesserocr.changes +++ b/python-tesserocr.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Mar 17 22:09:28 UTC 2023 - Mia Herkt + +- Update to 2.6.0 + * _pix_to_image now works with binary images + gh#sirfz/tesserocr#274 + * SetImage with alpha channels support + gh#sirfz/tesserocr#280 + * Leptonica 1.83.0 support + gh#sirfz/tesserocr#306 + * Pointsize should be returned even if fontname doesn't exist + gh#sirfz/tesserocr#308 + * Added Python 3.10, 3.11 setup classifiers +- Drop 1441bec703cf68161acce5e85907ddd71c47fdc3.patch + ------------------------------------------------------------------- Mon Feb 27 10:22:49 UTC 2023 - Daniel Garcia diff --git a/python-tesserocr.spec b/python-tesserocr.spec index d4f988a..4e58cb4 100644 --- a/python-tesserocr.spec +++ b/python-tesserocr.spec @@ -17,14 +17,13 @@ Name: python-tesserocr -Version: 2.5.2 +Version: 2.6.0 Release: 0 Summary: A Python wrapper around tesseract-ocr License: MIT Group: Development/Languages/Python URL: https://github.com/sirfz/tesserocr Source: https://files.pythonhosted.org/packages/source/t/tesserocr/tesserocr-%{version}.tar.gz -Patch1: 1441bec703cf68161acce5e85907ddd71c47fdc3.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module devel} @@ -52,7 +51,6 @@ GIL while processing an image in tesseract. %prep %setup -q -n tesserocr-%{version} -%patch1 -p1 %build %python_build diff --git a/tesserocr-2.5.2.tar.gz b/tesserocr-2.5.2.tar.gz deleted file mode 100644 index 6419d48..0000000 --- a/tesserocr-2.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9371dd3f6fe3238039c73bfe15bcaf21389f7e75f62bd530a30110149f39b2ae -size 57406 diff --git a/tesserocr-2.6.0.tar.gz b/tesserocr-2.6.0.tar.gz new file mode 100644 index 0000000..6041250 --- /dev/null +++ b/tesserocr-2.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77430d272b53dacd3bdd4af5d563fdc24ae51b86fdbc9cf2e8146f29c7abc9a4 +size 58637