python39Packages.pyocr: switch to pytestCheckHook, format, fix setuptools not finding version

This commit is contained in:
Sandro Jäckel 2021-08-31 20:21:41 +02:00 committed by Martin Weinelt
parent ff225beeae
commit c076955ffd

View File

@ -1,6 +1,16 @@
{ lib, fetchFromGitLab, buildPythonPackage, pillow, setuptools-scm,
setuptools-scm-git-archive , tesseract, cuneiform, isPy3k, substituteAll,
pytest, tox }:
{ lib
, fetchFromGitLab
, buildPythonPackage
, pillow
, setuptools-scm
, setuptools-scm-git-archive
, tesseract
, cuneiform
, isPy3k
, substituteAll
, pytestCheckHook
, tox
}:
buildPythonPackage rec {
pname = "pyocr";
@ -17,20 +27,25 @@ buildPythonPackage rec {
sha256 = "09ab86bmizpv94w3mdvdqkjyyvk1vafw3jqhkiw5xx7p180xn3il";
};
patches = [ (substituteAll {
src = ./paths.patch;
inherit cuneiform tesseract;
})
patches = [
(substituteAll {
src = ./paths.patch;
inherit cuneiform tesseract;
})
];
buildInputs = [ setuptools-scm setuptools-scm-git-archive ];
propagatedBuildInputs = [ pillow ];
checkInputs = [ pytest tox ];
checkPhase = "pytest";
SETUPTOOLS_SCM_PRETEND_VERSION = version;
meta = {
buildInputs = [ setuptools-scm setuptools-scm-git-archive ];
propagatedBuildInputs = [ pillow ];
checkInputs = [ pytestCheckHook ];
meta = with lib; {
inherit (src.meta) homepage;
description = "A Python wrapper for Tesseract and Cuneiform";
license = lib.licenses.gpl3Plus;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ];
};
}