diff --git a/0001-test_pixmap-adjust-to-turbojpeg.patch b/0001-test_pixmap-adjust-to-turbojpeg.patch new file mode 100644 index 0000000..1c653de --- /dev/null +++ b/0001-test_pixmap-adjust-to-turbojpeg.patch @@ -0,0 +1,29 @@ +From 735ce0fb7bf1938ead530b7138499464c6127f96 Mon Sep 17 00:00:00 2001 +Message-ID: <735ce0fb7bf1938ead530b7138499464c6127f96.1683816092.git.mjg@fedoraproject.org> +From: Michael J Gruber +Date: Thu, 11 May 2023 16:40:03 +0200 +Subject: [PATCH] test_pixmap: adjust to turbojpeg + +Apparantly, different jpeg libraries decode the test jpg differently. +Adjust to turbojpeg's color count until upstream uses an invariant +format. +--- + tests/test_pixmap.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_pixmap.py b/tests/test_pixmap.py +index 889858b..420245e 100644 +--- a/tests/test_pixmap.py ++++ b/tests/test_pixmap.py +@@ -91,7 +91,7 @@ def test_setalpha(): + + def test_color_count(): + pm = fitz.Pixmap(imgfile) +- assert pm.color_count() == 40624 ++ assert pm.color_count() == 39912 + + def test_memoryview(): + pm = fitz.Pixmap(imgfile) +-- +2.40.1.683.g916cfae490 + diff --git a/python-PyMuPDF.spec b/python-PyMuPDF.spec index cf2d5d8..745ffde 100644 --- a/python-PyMuPDF.spec +++ b/python-PyMuPDF.spec @@ -2,13 +2,14 @@ Name: python-%{pypi_name} Version: 1.22.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python binding for MuPDF - a lightweight PDF and XPS viewer License: AGPL-3.0-or-later URL: https://github.com/pymupdf/PyMuPDF Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz Patch0: 0001-fix-test_-font.patch +Patch1: 0001-test_pixmap-adjust-to-turbojpeg.patch BuildRequires: python3-devel BuildRequires: python3-fonttools @@ -69,8 +70,11 @@ rm -f %{buildroot}%{_prefix}/README.md %check # FIXME: Crashes with Aborted, corrupted double-linked list +%ifarch s390 s390x %pytest || : - +%else +%pytest +%endif %files -n python3-%{pypi_name} %license COPYING @@ -81,6 +85,9 @@ rm -f %{buildroot}%{_prefix}/README.md %doc docs_built/* README.md %changelog +* Thu May 11 2023 Michael J Gruber - 1.22.3-2 +- Reenable test suite where possible + * Thu May 11 2023 Michael J Gruber - 1.22.3-1 - Update to new upstream release 1.22.3 (rhbz#2186919)