Skip to content

Commit 58bc3da

Browse files
authored
Merge pull request #332214 from dotlambda/python3Packages.ocrmypdf
python312Packages.ocrmypdf: 16.4.2 -> 16.4.3
2 parents d6adda6 + 6413820 commit 58bc3da

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

pkgs/development/python-modules/ocrmypdf/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
buildPythonPackage rec {
3030
pname = "ocrmypdf";
31-
version = "16.4.2";
31+
version = "16.4.3";
3232

3333
disabled = pythonOlder "3.10";
3434

@@ -44,7 +44,7 @@ buildPythonPackage rec {
4444
postFetch = ''
4545
rm "$out/.git_archival.txt"
4646
'';
47-
hash = "sha256-zU3Yzdu5iF6USGj7bpf52+UMyeJuC7LFvR9NOrd8gXE=";
47+
hash = "sha256-SHinfAWUqrPnHdDDXa1meVfxsyct17b1ak5U91GEc1w=";
4848
};
4949

5050
patches = [

pkgs/development/python-modules/ocrmypdf/paths.patch

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/ocrmypdf/_exec/ghostscript.py b/src/ocrmypdf/_exec/ghostscript.py
2-
index 94eec244..4bb15db9 100644
2+
index eaa48117..30201d97 100644
33
--- a/src/ocrmypdf/_exec/ghostscript.py
44
+++ b/src/ocrmypdf/_exec/ghostscript.py
55
@@ -31,7 +31,7 @@ COLOR_CONVERSION_STRATEGIES = frozenset(
@@ -12,19 +12,19 @@ index 94eec244..4bb15db9 100644
1212

1313
log = logging.getLogger(__name__)
1414
diff --git a/src/ocrmypdf/_exec/jbig2enc.py b/src/ocrmypdf/_exec/jbig2enc.py
15-
index 5a34a95a..5ee1b333 100644
15+
index 1c6dd5fe..b689a091 100644
1616
--- a/src/ocrmypdf/_exec/jbig2enc.py
1717
+++ b/src/ocrmypdf/_exec/jbig2enc.py
18-
@@ -14,7 +14,7 @@ from ocrmypdf.subprocess import get_version, run
19-
18+
@@ -15,7 +15,7 @@ from ocrmypdf.subprocess import get_version, run
2019

2120
def version() -> Version:
22-
- return Version(get_version('jbig2', regex=r'jbig2enc (\d+(\.\d+)*).*'))
23-
+ return Version(get_version('@jbig2@', regex=r'jbig2enc (\d+(\.\d+)*).*'))
24-
25-
26-
def available():
27-
@@ -27,7 +27,7 @@ def available():
21+
try:
22+
- version = get_version('jbig2', regex=r'jbig2enc (\d+(\.\d+)*).*')
23+
+ version = get_version('@jbig2@', regex=r'jbig2enc (\d+(\.\d+)*).*')
24+
except CalledProcessError as e:
25+
# TeX Live for Windows provides an incompatible jbig2.EXE which may
26+
# be on the PATH.
27+
@@ -33,7 +33,7 @@ def available():
2828

2929
def convert_group(cwd, infiles, out_prefix, threshold):
3030
args = [
@@ -33,7 +33,7 @@ index 5a34a95a..5ee1b333 100644
3333
'-b',
3434
out_prefix,
3535
'--symbol-mode', # symbol mode (lossy)
36-
@@ -44,7 +44,7 @@ def convert_group(cwd, infiles, out_prefix, threshold):
36+
@@ -50,7 +50,7 @@ def convert_group(cwd, infiles, out_prefix, threshold):
3737

3838

3939
def convert_single(cwd, infile, outfile, threshold):
@@ -65,7 +65,7 @@ index 5b8600d0..fcad771b 100644
6565
'--skip-if-larger',
6666
'--quality',
6767
diff --git a/src/ocrmypdf/_exec/tesseract.py b/src/ocrmypdf/_exec/tesseract.py
68-
index fab92bb1..78b634a7 100644
68+
index 102bdab8..bfef4400 100644
6969
--- a/src/ocrmypdf/_exec/tesseract.py
7070
+++ b/src/ocrmypdf/_exec/tesseract.py
7171
@@ -95,7 +95,7 @@ class TesseractVersion(Version):
@@ -96,10 +96,10 @@ index fab92bb1..78b634a7 100644
9696
args.extend(['-l', '+'.join(langs)])
9797
if engine_mode is not None:
9898
diff --git a/src/ocrmypdf/_exec/unpaper.py b/src/ocrmypdf/_exec/unpaper.py
99-
index 493d9b3a..578c2dda 100644
99+
index d1165c46..7c732b15 100644
100100
--- a/src/ocrmypdf/_exec/unpaper.py
101101
+++ b/src/ocrmypdf/_exec/unpaper.py
102-
@@ -70,7 +70,7 @@ class UnpaperImageTooLargeError(Exception):
102+
@@ -48,7 +48,7 @@ class UnpaperImageTooLargeError(Exception):
103103

104104

105105
def version() -> Version:
@@ -108,7 +108,7 @@ index 493d9b3a..578c2dda 100644
108108

109109

110110
@contextmanager
111-
@@ -92,7 +92,7 @@ def _setup_unpaper_io(input_file: Path) -> Iterator[tuple[Path, Path, Path]]:
111+
@@ -70,7 +70,7 @@ def _setup_unpaper_io(input_file: Path) -> Iterator[tuple[Path, Path, Path]]:
112112
def run_unpaper(
113113
input_file: Path, output_file: Path, *, dpi: DecFloat, mode_args: list[str]
114114
) -> None:

0 commit comments

Comments
 (0)