python3Packages.tesserocr: enable tests, cleanup

This commit is contained in:
Martin Weinelt 2022-09-21 16:45:56 +02:00
parent 29296ae861
commit 5603d7f832
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1,14 +1,18 @@
{
buildPythonPackage,
fetchPypi,
lib,
# build dependencies
cython,
leptonica,
pkg-config,
tesseract,
# extra python packages
pillow
{ buildPythonPackage
, fetchPypi
, lib
# build dependencies
, cython
, leptonica
, pkg-config
, tesseract
# propagates
, pillow
# tests
, unittestCheckHook
}:
buildPythonPackage rec {
@ -20,11 +24,30 @@ buildPythonPackage rec {
sha256 = "1bmj76gi8401lcqdaaznfmz9yf11myy1bzivqwwq08z3dwzxswck";
};
nativeBuildInputs = [ cython pkg-config ];
buildInputs = [ leptonica tesseract ];
propagatedBuildInputs = [ pillow ];
nativeBuildInputs = [
cython
pkg-config
];
buildInputs = [
leptonica
tesseract
];
propagatedBuildInputs = [
pillow
];
pythonImportsCheck = [
"tesserocr"
];
checkInputs = [
unittestCheckHook
];
meta = with lib; {
changelog = "https://github.com/sirfz/tesserocr/releases/tag/v${version}";
description = "A simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR)";
homepage = "https://github.com/sirfz/tesserocr";
license = licenses.mit;