pythonPackages.pyocr: 0.5.3 -> 0.7.2
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{ lib, fetchFromGitLab, buildPythonPackage, pillow, six
|
||||
, tesseract, cuneiform, isPy3k, substituteAll, pytest, tox
|
||||
}:
|
||||
{ lib, fetchFromGitLab, buildPythonPackage, pillow, setuptools_scm,
|
||||
setuptools-scm-git-archive , tesseract, cuneiform, isPy3k, substituteAll,
|
||||
pytest, tox }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyocr";
|
||||
version = "0.5.3";
|
||||
version = "0.7.2";
|
||||
disabled = !isPy3k;
|
||||
|
||||
# Don't fetch from PYPI because it doesn't contain tests.
|
||||
@@ -14,7 +14,7 @@ buildPythonPackage rec {
|
||||
owner = "OpenPaperwork";
|
||||
repo = "pyocr";
|
||||
rev = version;
|
||||
sha256 = "1nihf0qmbpg3yj3yp11jp6hp5z5dqf39nz6j9lqbvgi1nqbs7x15";
|
||||
sha256 = "09ab86bmizpv94w3mdvdqkjyyvk1vafw3jqhkiw5xx7p180xn3il";
|
||||
};
|
||||
|
||||
patches = [ (substituteAll {
|
||||
@@ -23,38 +23,8 @@ buildPythonPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
echo 'version = "${version}"' > src/pyocr/_version.py
|
||||
|
||||
# Disable specific tests that are probably failing because of this issue:
|
||||
# https://github.com/jflesch/pyocr/issues/52
|
||||
for test in $disabledTests; do
|
||||
file="''${test%%:*}"
|
||||
fun="''${test#*:}"
|
||||
echo "import pytest" >> "tests/tests_$file.py"
|
||||
echo "$fun = pytest.mark.skip($fun)" >> "tests/tests_$file.py"
|
||||
done
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
"cuneiform:TestTxt.test_basic"
|
||||
"cuneiform:TestTxt.test_european"
|
||||
"cuneiform:TestTxt.test_french"
|
||||
"cuneiform:TestWordBox.test_basic"
|
||||
"cuneiform:TestWordBox.test_european"
|
||||
"cuneiform:TestWordBox.test_french"
|
||||
"libtesseract:TestBasicDoc.test_basic"
|
||||
"libtesseract:TestDigitLineBox.test_digits"
|
||||
"libtesseract:TestLineBox.test_japanese"
|
||||
"libtesseract:TestTxt.test_japanese"
|
||||
"libtesseract:TestWordBox.test_japanese"
|
||||
"libtesseract:TestTxt.test_multi"
|
||||
"tesseract:TestTxt.test_multi"
|
||||
"tesseract:TestDigitLineBox.test_digits"
|
||||
"tesseract:TestTxt.test_japanese"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ pillow six ];
|
||||
buildInputs = [ setuptools_scm setuptools-scm-git-archive ];
|
||||
propagatedBuildInputs = [ pillow ];
|
||||
checkInputs = [ pytest tox ];
|
||||
checkPhase = "pytest";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user