mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 03:03:37 +00:00
python39Packages.pyocr: switch to pytestCheckHook, format, fix setuptools not finding version
This commit is contained in:
parent
19bad30a35
commit
b869a4836c
@ -1,6 +1,16 @@
|
|||||||
{ lib, fetchFromGitLab, buildPythonPackage, pillow, setuptools-scm,
|
{ lib
|
||||||
setuptools-scm-git-archive , tesseract, cuneiform, isPy3k, substituteAll,
|
, fetchFromGitLab
|
||||||
pytest, tox }:
|
, buildPythonPackage
|
||||||
|
, pillow
|
||||||
|
, setuptools-scm
|
||||||
|
, setuptools-scm-git-archive
|
||||||
|
, tesseract
|
||||||
|
, cuneiform
|
||||||
|
, isPy3k
|
||||||
|
, substituteAll
|
||||||
|
, pytestCheckHook
|
||||||
|
, tox
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pyocr";
|
pname = "pyocr";
|
||||||
@ -17,20 +27,25 @@ buildPythonPackage rec {
|
|||||||
sha256 = "09ab86bmizpv94w3mdvdqkjyyvk1vafw3jqhkiw5xx7p180xn3il";
|
sha256 = "09ab86bmizpv94w3mdvdqkjyyvk1vafw3jqhkiw5xx7p180xn3il";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ (substituteAll {
|
patches = [
|
||||||
|
(substituteAll {
|
||||||
src = ./paths.patch;
|
src = ./paths.patch;
|
||||||
inherit cuneiform tesseract;
|
inherit cuneiform tesseract;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ setuptools-scm setuptools-scm-git-archive ];
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
propagatedBuildInputs = [ pillow ];
|
|
||||||
checkInputs = [ pytest tox ];
|
|
||||||
checkPhase = "pytest";
|
|
||||||
|
|
||||||
meta = {
|
buildInputs = [ setuptools-scm setuptools-scm-git-archive ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ pillow ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
inherit (src.meta) homepage;
|
inherit (src.meta) homepage;
|
||||||
description = "A Python wrapper for Tesseract and Cuneiform";
|
description = "A Python wrapper for Tesseract and Cuneiform";
|
||||||
license = lib.licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user