python311Packages.ocrmypdf: 16.1.2 -> 16.2.0
Diff: https://github.com/ocrmypdf/OCRmyPDF/compare/v16.1.2...v16.2.0 Changelog: https://github.com/ocrmypdf/OCRmyPDF/blob/v16.2.0/docs/release_notes.rst
This commit is contained in:
parent
8cb6569074
commit
4ab4ab0e2a
|
@ -9,6 +9,7 @@
|
||||||
, jbig2enc
|
, jbig2enc
|
||||||
, packaging
|
, packaging
|
||||||
, pdfminer-six
|
, pdfminer-six
|
||||||
|
, pillow-heif
|
||||||
, pikepdf
|
, pikepdf
|
||||||
, pillow
|
, pillow
|
||||||
, pluggy
|
, pluggy
|
||||||
|
@ -18,19 +19,17 @@
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, rich
|
, rich
|
||||||
, reportlab
|
, reportlab
|
||||||
, setuptools
|
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, tesseract
|
, tesseract
|
||||||
, tqdm
|
, tqdm
|
||||||
, typing-extensions
|
|
||||||
, unpaper
|
, unpaper
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ocrmypdf";
|
pname = "ocrmypdf";
|
||||||
version = "16.1.2";
|
version = "16.2.0";
|
||||||
|
|
||||||
disabled = pythonOlder "3.10";
|
disabled = pythonOlder "3.10";
|
||||||
|
|
||||||
|
@ -46,10 +45,11 @@ buildPythonPackage rec {
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
rm "$out/.git_archival.txt"
|
rm "$out/.git_archival.txt"
|
||||||
'';
|
'';
|
||||||
hash = "sha256-nZvfkfO5u3iuN0g/KITWbhYCRAJngEOKCW48z6IEPMI=";
|
hash = "sha256-sqhuQ+no6UymxbVtDtWiYQK8kKpO1y37NxLDmRT1LEQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
./use-pillow-heif.patch
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./paths.patch;
|
src = ./paths.patch;
|
||||||
gs = lib.getExe ghostscript;
|
gs = lib.getExe ghostscript;
|
||||||
|
@ -60,30 +60,31 @@ buildPythonPackage rec {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
build-system = [
|
||||||
setuptools
|
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
installShellFiles
|
installShellFiles
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
deprecation
|
deprecation
|
||||||
img2pdf
|
img2pdf
|
||||||
packaging
|
packaging
|
||||||
pdfminer-six
|
pdfminer-six
|
||||||
|
pillow-heif
|
||||||
pikepdf
|
pikepdf
|
||||||
pillow
|
pillow
|
||||||
pluggy
|
pluggy
|
||||||
reportlab
|
|
||||||
rich
|
rich
|
||||||
] ++ lib.optionals (pythonOlder "3.10") [
|
|
||||||
typing-extensions
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
hypothesis
|
hypothesis
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
|
reportlab
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
|
index d045458f..efa9161d 100644
|
||||||
|
--- a/pyproject.toml
|
||||||
|
+++ b/pyproject.toml
|
||||||
|
@@ -16,7 +16,7 @@ dependencies = [
|
||||||
|
"img2pdf>=0.5",
|
||||||
|
"packaging>=20",
|
||||||
|
"pdfminer.six>=20220319",
|
||||||
|
- "pi-heif", # Heif image format - maintainers: if this is removed, it will NOT break
|
||||||
|
+ "pillow-heif", # Heif image format - maintainers: if this is removed, it will NOT break
|
||||||
|
"pikepdf>=8.10.1",
|
||||||
|
"Pillow>=10.0.1",
|
||||||
|
"pluggy>=1",
|
||||||
|
diff --git a/src/ocrmypdf/_pipeline.py b/src/ocrmypdf/_pipeline.py
|
||||||
|
index 043a78a0..522197b1 100644
|
||||||
|
--- a/src/ocrmypdf/_pipeline.py
|
||||||
|
+++ b/src/ocrmypdf/_pipeline.py
|
||||||
|
@@ -42,7 +42,7 @@ from ocrmypdf.pdfinfo import Colorspace, Encoding, PageInfo, PdfInfo
|
||||||
|
from ocrmypdf.pluginspec import OrientationConfidence
|
||||||
|
|
||||||
|
try:
|
||||||
|
- from pi_heif import register_heif_opener
|
||||||
|
+ from pillow_heif import register_heif_opener
|
||||||
|
except ImportError:
|
||||||
|
|
||||||
|
def register_heif_opener():
|
Loading…
Reference in New Issue
Block a user