15
0

- Update to 2.9.2

* Make AnalyseLayout interruptible
    gh#sirfz/tesserocr#382

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tesserocr?expand=0&rev=52
This commit is contained in:
2025-12-19 02:00:26 +00:00
committed by Git OBS Bridge
commit e3529bef87
9 changed files with 382 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

252
python-tesserocr.changes Normal file
View File

@@ -0,0 +1,252 @@
-------------------------------------------------------------------
Fri Dec 19 01:56:36 UTC 2025 - Mia Herkt <mia@0x0.st>
- Update to 2.9.2
* Make AnalyseLayout interruptible
gh#sirfz/tesserocr#382
-------------------------------------------------------------------
Fri Oct 10 16:08:51 UTC 2025 - Mia Herkt <mia@0x0.st>
- Update to 2.9.1
No relevant changes.
-------------------------------------------------------------------
Thu Oct 9 20:40:28 UTC 2025 - Mia Herkt <mia@0x0.st>
- Drop unpin-cython.patch
but make version range explicit in BuildRequires
- Update to 2.9.0
* fix: update test, make it pass
gh#sirfz/tesserocr#364
* Improve stub file
gh#sirfz/tesserocr#371
* Convert more exceptions
gh#sirfz/tesserocr#365
* Drop python2 support
gh#sirfz/tesserocr#377
* All words error handling
gh#sirfz/tesserocr#378
-------------------------------------------------------------------
Mon Aug 4 14:15:13 UTC 2025 - Felix Stegmeier <felix.stegmeier@suse.com>
- add unpin-cython.patch to unpin cython version
-------------------------------------------------------------------
Mon Mar 10 15:10:04 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.8.0
* Build Python 3.13 wheels by @nijel in (#357)
* chore(ci): Modernize wheel builds by @nijel in (#362)
- Switch build system from setuptools to pyproject.toml
* Add python-pip and python-wheel to BuildRequires
* Replace %python_build with %pyproject_wheel
* Replace %python_install with %pyproject_install
- Use Python 3.11 on SLE-15 by default
-------------------------------------------------------------------
Mon Sep 23 09:20:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 2.7.1:
* bugfix: `set_leptonica_log_level` expects int
* revert: disable tesseract's logging by default
-------------------------------------------------------------------
Sun Apr 28 15:30:33 UTC 2024 - Mia Herkt <mia@0x0.st>
- Update to 2.7.0:
* Allow passing configs/variables on initialization
gh#sirfz/tesserocr#349
* Stub file for completion
gh#sirfz/tesserocr#350
* Expose leptonica's log level setting via
set_leptonica_log_level function
* Keep tesseract's default debug_file setting
-------------------------------------------------------------------
Tue Apr 2 18:53:44 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 2.6.3:
* Clarified the comments for tessdata path
* skip unit test for GetComponentImages if Pillow is missing
* Build with C++17 for Tesseract>=5.3.4
-------------------------------------------------------------------
Tue Nov 7 01:04:01 UTC 2023 - Mia Herkt <mia@0x0.st>
- Update to 2.6.2 (no user-facing changes)
-------------------------------------------------------------------
Sun Jun 11 08:18:48 UTC 2023 - Mia Herkt <mia@0x0.st>
- Fix build: Add libcurl dependency
-------------------------------------------------------------------
Fri Mar 17 22:09:28 UTC 2023 - Mia Herkt <mia@0x0.st>
- 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 <daniel.garcia@suse.com>
- Disable current broken tests, test_LSTM_choices, test_detect_os and
or test_init, gh#sirfz/tesserocr#295
-------------------------------------------------------------------
Sat Jan 14 21:46:21 UTC 2023 - Hans-Peter Jansen <hpj@urpla.net>
- Apply 1441bec703cf68161acce5e85907ddd71c47fdc3.patch from upstream
project in order to build with Leptonica 1.83.0
- Make tests work again
-------------------------------------------------------------------
Fri Nov 11 13:26:52 UTC 2022 - pgajdos@suse.com
- silent rpmlint
-------------------------------------------------------------------
Fri Nov 11 11:29:53 UTC 2022 - pgajdos@suse.com
- python-six is not required
-------------------------------------------------------------------
Wed Jun 23 17:43:23 UTC 2021 - Mia Herkt <mia@0x0.st>
- Update to 2.5.2
* Support new Tesseract 5 API (gh#sirfz/tesserocr#242)
* GetBestLSTMSymbolChoices crash fix (gh#sirfz/tesserocr#241)
* Fallback to BMP instead of PNG
* Create pix from a BMP image bytes (gh#sirfz/tesserocr#156)
-------------------------------------------------------------------
Thu Mar 26 10:39:41 UTC 2020 - pgajdos@suse.com
- version update to 2.5.1
* Fix order of linker arguments (#211)
* Fix memory leaks in GetComponentImages (#213)
-------------------------------------------------------------------
Mon Jan 13 17:25:21 UTC 2020 - pgajdos@suse.com
- disable test_LSTM_choices temporarily
https://github.com/sirfz/tesserocr/issues/214
-------------------------------------------------------------------
Tue Nov 26 00:49:44 UTC 2019 - Martin Herkt <9+suse@cirno.systems>
- Update to version 2.5.0
* Support for RowAttributes method in LTRResultIterator
* SetImage: use PNG instead of JPEG fallback
* Replace STRING::string() by c_str()
* Don't use assignment operator for TessBaseAPI
-------------------------------------------------------------------
Fri Aug 23 18:14:51 UTC 2019 - Martin Herkt <9+suse@cirno.systems>
- Update to version 2.4.1
* fix pixa_to_list python3 segfault
* fix BlockPolygon python3 segfault
-------------------------------------------------------------------
Thu Dec 6 12:42:12 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Trim bias and filler wording.
-------------------------------------------------------------------
Wed Dec 5 23:35:00 UTC 2018 - Martin Herkt <9+suse@cirno.systems>
- Update to version 2.4.0
Tesseract v4 new API methods supported:
* GetBestLSTMSymbolChoices
* BlanWksBeforeWord
-------------------------------------------------------------------
Mon Aug 13 18:20:26 UTC 2018 - 9+suse@cirno.systems
- Update to version 2.3.1
* Python 3.7 support release
-------------------------------------------------------------------
Thu Aug 2 09:40:45 UTC 2018 - tchvatal@suse.com
- Ensure we require some of the tesseract data so we can do at
least some basic ocr operations
-------------------------------------------------------------------
Thu Aug 2 08:59:20 UTC 2018 - tchvatal@suse.com
- Drop unused bcond
-------------------------------------------------------------------
Tue Jun 26 16:07:43 UTC 2018 - 9+suse@cirno.systems
- Run tests
- Use %license macro
- Update to version 2.3.0
* Support for Tesseract 4
+ New OCR engines LSTM_ONLY and TESSERACT_LSTM_COMBINED
+ New default tessdata path handling
* Fixed compilation against Tesseract v3.05.02 which required
c++11
* Fallback to 'eng' as default language when default language
returned by the API is empty
-------------------------------------------------------------------
Fri Aug 11 12:01:33 UTC 2017 - 9@cirno.systems
- Add doc files
-------------------------------------------------------------------
Sun Aug 6 10:37:03 UTC 2017 - 9@cirno.systems
- Switch to PyPI source URL
- Add Pillow (PIL) to Recommends
-------------------------------------------------------------------
Wed Jul 26 19:42:30 UTC 2017 - 9@cirno.systems
- v2.2.2
* Support timeout in Recognize API methods
* Fixed typo in _Enum initialization error message formatting
* Display tessdata path in init exception message
* Fixed version check in Python 3 when reading the version number
from the tesseract executable
-------------------------------------------------------------------
Thu Jun 1 18:06:25 UTC 2017 - 9@cirno.systems
v2.2.1
* Fixed setup bug that affects gcc versions with no -std=c++11 option support
(which should be required by tesseract 4.0+ and not older versions).
-------------------------------------------------------------------
Sun May 28 15:39:24 UTC 2017 - 9@cirno.systems
v2.2.0
* Improved setup script
* Tesseract 4.0 support:
- Two new OEM enums: OEM.LSTM_ONLY and OEM.TESSERACT_LSTM_COMBINED (tesseract 4.0+)
- Two new API methods: GetTSVText and DetectOrientationScript (tesseract 4.0+)
- PyTessBaseApi.__init__ now accepts a new attribute oem (OCR engine mode: OEM.DEFAULT by default).
- file_to_text and image_to_text functions now also accept the oem attribute as above.
* Fixed segfault on API Init* failure
* Fixed segfault when pixa_to_list returns NULL
* Documentation fixes and other minor improvments
-------------------------------------------------------------------
Sat Apr 1 03:18:38 UTC 2017 - 9@cirno.systems
- Initial commit

81
python-tesserocr.spec Normal file
View File

@@ -0,0 +1,81 @@
#
# spec file for package python-tesserocr
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-tesserocr
Version: 2.9.2
Release: 0
Summary: A Python wrapper around tesseract-ocr
License: MIT
URL: https://github.com/sirfz/tesserocr
Source: https://files.pythonhosted.org/packages/source/t/tesserocr/tesserocr-%{version}.tar.gz
BuildRequires: %{python_module Cython3 < 3.2.0}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: tesseract-ocr-traineddata-english
BuildRequires: tesseract-ocr-traineddata-orientation_and_script_detection
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(tesseract)
Requires: tesseract-ocr-traineddata-english
Requires: tesseract-ocr-traineddata-orientation_and_script_detection
Recommends: python-Pillow
%python_subpackages
%description
A wrapper around the tesseract-ocr API for Optical Character
Recognition (OCR).
tesserocr integrates directly with Tesseract's C++ API using Cython
which allows for Pythonic source code. It enables real concurrent
execution when used with Python's threading module by releasing the
GIL while processing an image in tesseract.
%prep
%autosetup -p1 -n tesserocr-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%fdupes %{buildroot}
%check
export TESSDATA_PREFIX=%{_datadir}/tessdata
%python_exec setup.py develop --user
# test_LSTM_choices failure: https://github.com/sirfz/tesserocr/issues/214
# https://github.com/sirfz/tesserocr/issues/295
donttest="test_LSTM_choices"
donttest+=" or test_detect_os"
donttest+=" or test_init"
%pytest -k "not ($donttest)"
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitearch}/tesserocr*
%changelog

3
tesserocr-2.8.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be518d1b1b5ff54c11aada1e0fd12942509ea70581e0a8b39a2a473a0b2dbd36
size 72564

3
tesserocr-2.9.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4caa6540f6359189e63be2f1cc4d3789130075f4de97eda8205f4f47de2fc1cf
size 71976

3
tesserocr-2.9.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cb809fde3421b347958f725afe70b341a02149078c7f02e4cffa80121d161219
size 71947

3
tesserocr-2.9.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2fa1fe3c79575d6fd5b527785e773fa19b055f07f922feb2ac9d6c1e62233522
size 72051

13
unpin-cython.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: tesserocr-2.8.0/setup.py
===================================================================
--- tesserocr-2.8.0.orig/setup.py
+++ tesserocr-2.8.0/setup.py
@@ -318,7 +318,7 @@ setup(
cmdclass={"build_ext": my_build_ext},
ext_modules=[make_extension()],
test_suite="tests",
- setup_requires=["Cython>=0.23,<3.1.0"],
+ setup_requires=["Cython>=0.23"],
packages=["tesserocr"],
package_dir={"tesserocr": "tesserocr"},
)