Skip to content

Commit 8f918c8

Browse files
committed
FIXUP: Various CI-related fixes
1 parent 91963c0 commit 8f918c8

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ jobs:
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: '3.11'
39-
- run: pip install poetry
40-
- run: poetry install
4139
- name: Restore cached tessdata
4240
uses: actions/cache/restore@v4
4341
with:
4442
path: share/tessdata/
4543
enableCrossOsArchive: true
4644
fail-on-cache-miss: true
4745
key: v1-tessdata-${{ hashFiles('./install/common/download-tessdata.py') }}
46+
- run: pip install poetry
47+
- run: poetry install
4848
- name: Run CLI tests
4949
run: poetry run make test
5050
# Taken from: https://github.com/orgs/community/discussions/27149#discussioncomment-3254829

dangerzone/isolation_provider/base.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,14 @@ def pixels_to_pdf_page(
172172
page_pdf_bytes = self.ocr_page(pixmap, ocr_lang)
173173
else: # Don't OCR
174174
page_doc = fitz.Document()
175-
page_doc.insert_file(pixmap)
176-
page_pdf_bytes = page_doc.tobytes(deflate_images=True)
175+
# Added in PyMuPDF 1.22.0 (commit 6a9c9d8175c307f7f3baf605c8632745f69a8b1b)
176+
if hasattr(page_doc, "insert_file"):
177+
page_doc.insert_file(pixmap)
178+
page_pdf_bytes = page_doc.tobytes(deflate_images=True)
179+
else:
180+
page = page_doc.newPage()
181+
page.insertImage(page.rect, pixmap=pixmap)
182+
page_pdf_bytes = page_doc.write(deflate=True)
177183

178184
return fitz.open("pdf", page_pdf_bytes)
179185

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ python = ">=3.9,<3.13"
1717
click = "*"
1818
appdirs = "*"
1919
PySide6 = "^6.7.1"
20-
PyMuPDF = "^1.23.8"
20+
PyMuPDF = "^1.16.11"
2121
colorama = "*"
2222
pyxdg = {version = "*", platform = "linux"}
2323
requests = "*"

stdeb.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[DEFAULT]
22
Package3: dangerzone
3-
Depends3: podman, python3, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtwidgets, python3-pyside2.qtsvg, python3-appdirs, python3-click, python3-xdg, python3-colorama, python3-requests, python3-markdown, python3-packaging, python3-fitz (>= 1.19.0) | pyocr
3+
Depends3: podman, python3, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtwidgets, python3-pyside2.qtsvg, python3-appdirs, python3-click, python3-xdg, python3-colorama, python3-requests, python3-markdown, python3-packaging, python3-fitz (>= 1.19.0) | python3-pyocr
44
Build-Depends: dh-python, python3, python3-setuptools, python3-stdeb
55
Suite: bionic
66
X-Python3-Version: >= 3.8

0 commit comments

Comments
 (0)