2018-05-24 20:56:47 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pytesseract
|
|
|
|
#
|
2019-05-14 21:34:44 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2018-05-24 20:56:47 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 13:55:02 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-24 20:56:47 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-pytesseract
|
2019-07-22 13:32:02 +00:00
|
|
|
Version: 0.2.7
|
2018-05-24 20:56:47 +00:00
|
|
|
Release: 0
|
2018-07-30 07:34:40 +00:00
|
|
|
Summary: Python wrapper for Google's Tesseract-OCR
|
|
|
|
License: GPL-3.0-only
|
2018-05-24 20:56:47 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-05-14 21:34:44 +00:00
|
|
|
URL: https://github.com/madmaze/python-tesseract
|
2018-05-24 20:56:47 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytesseract/pytesseract-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-05-14 21:34:44 +00:00
|
|
|
Requires: python-Pillow
|
|
|
|
Requires: tesseract-traineddata-deu
|
|
|
|
Requires: tesseract-traineddata-eng
|
|
|
|
Requires: pkgconfig(tesseract)
|
|
|
|
BuildArch: noarch
|
2018-05-24 20:56:47 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module Pillow}
|
|
|
|
BuildRequires: tesseract-traineddata-deu
|
2018-07-30 07:34:40 +00:00
|
|
|
BuildRequires: tesseract-traineddata-eng
|
|
|
|
BuildRequires: pkgconfig(tesseract)
|
2018-05-24 20:56:47 +00:00
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2018-07-30 07:34:40 +00:00
|
|
|
Python-tesseract is an optical character recognition (OCR) tool for Python,
|
|
|
|
that is, it will recognize and "read" the text embedded in images.
|
2018-05-24 20:56:47 +00:00
|
|
|
|
2018-07-30 07:34:40 +00:00
|
|
|
Python-tesseract is a wrapper for Google's Tesseract-OCR Engine. It can be used
|
|
|
|
as a stand-alone invocation script to tesseract, as it can read all image types
|
|
|
|
supported by the Python Imaging Library, including JPEG, PNG, GIF, BMP, TIFF,
|
|
|
|
and others, whereas tesseract-ocr, by default, only supports TIFF and BMP.
|
|
|
|
Additionally, if used as a script, python-tesseract will print the recognized
|
|
|
|
text instead of writing it to a file. There is no support for confidence estimates and
|
2018-05-24 20:56:47 +00:00
|
|
|
bounding box data is planned for future releases.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pytesseract-%{version}
|
|
|
|
sed -i -e '/^#!\//, 1d' src/pytesseract.py
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
|
|
|
%python3_only %{_bindir}/pytesseract
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|