Update to new upstream release 1.24.4 (rhbz#2280912)

- Various fixes (1.24.3, 1.24.4)
- The Python module is now (1.24.3 and up) called `pymupdf`. `fitz` is still supported for backwards compatibility.
This commit is contained in:
Michael J Gruber 2024-05-17 10:42:38 +02:00
parent f559893430
commit fe70406307
5 changed files with 23 additions and 19 deletions

1
.gitignore vendored
View File

@ -86,3 +86,4 @@
/PyMuPDF-1.24.0.tar.gz
/PyMuPDF-1.24.1.tar.gz
/PyMuPDF-1.24.2.tar.gz
/PyMuPDF-1.24.4.tar.gz

View File

@ -1,5 +1,5 @@
From 17289c8e8a8e41edd2111c462b0f51ec0ac0ef24 Mon Sep 17 00:00:00 2001
Message-ID: <17289c8e8a8e41edd2111c462b0f51ec0ac0ef24.1707427913.git.mjg@fedoraproject.org>
From 34f259627a1ba6c354b7108cc36b3aa8e3ee3581 Mon Sep 17 00:00:00 2001
Message-ID: <34f259627a1ba6c354b7108cc36b3aa8e3ee3581.1714747659.git.mjg@fedoraproject.org>
From: Michael J Gruber <mjg@fedoraproject.org>
Date: Sat, 15 Apr 2023 17:53:27 +0200
Subject: [PATCH] fix test_*font
@ -13,31 +13,31 @@ Adjust the tests to use the fallback font instead.
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/test_general.py b/tests/test_general.py
index 44c4cbcd..2d66ccc8 100644
index 9b4b7aca..829ec0cf 100644
--- a/tests/test_general.py
+++ b/tests/test_general.py
@@ -156,9 +156,9 @@ def test_bug1971():
@@ -162,9 +162,9 @@ def test_bug1971():
assert doc.is_closed
def test_default_font():
- f = fitz.Font()
- f = pymupdf.Font()
- assert str(f) == "Font('Noto Serif Regular')"
- assert repr(f) == "Font('Noto Serif Regular')"
+ f = fitz.Font(ordering=0)
+ f = pymupdf.Font(ordering=0)
+ assert str(f) == "Font('Droid Sans Fallback Regular')"
+ assert repr(f) == "Font('Droid Sans Fallback Regular')"
def test_add_ink_annot():
import math
@@ -221,7 +221,7 @@ def test_get_text_dict():
@@ -227,7 +227,7 @@ def test_get_text_dict():
json.dumps( blocks, indent=4)
def test_font():
- font = fitz.Font()
+ font = fitz.Font(ordering=0)
- font = pymupdf.Font()
+ font = pymupdf.Font(ordering=0)
print(repr(font))
bbox = font.glyph_bbox( 65)
print( f'bbox={bbox!r}')
--
2.43.0.710.g31023adb55
2.45.0.126.g110af8c3bd

View File

@ -1,5 +1,5 @@
From d755e35a74fe6a32bd8cca465f2b05184d39207a Mon Sep 17 00:00:00 2001
Message-ID: <d755e35a74fe6a32bd8cca465f2b05184d39207a.1707427333.git.mjg@fedoraproject.org>
From 13594d8a26b80e7c2135e10bb90b370662c6914d Mon Sep 17 00:00:00 2001
Message-ID: <13594d8a26b80e7c2135e10bb90b370662c6914d.1714747656.git.mjg@fedoraproject.org>
From: Michael J Gruber <mjg@fedoraproject.org>
Date: Thu, 11 May 2023 16:40:03 +0200
Subject: [PATCH] test_pixmap: adjust to turbojpeg
@ -12,18 +12,18 @@ format.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_pixmap.py b/tests/test_pixmap.py
index 3c4a1be5..49a897e3 100644
index 4ee10505..e7e3dc89 100644
--- a/tests/test_pixmap.py
+++ b/tests/test_pixmap.py
@@ -99,7 +99,7 @@ def test_color_count():
e.g. in Linux system installs.
'''
pm = fitz.Pixmap(imgfile)
pm = pymupdf.Pixmap(imgfile)
- assert pm.color_count() == 40624
+ assert pm.color_count() == 39912
def test_memoryview():
pm = fitz.Pixmap(imgfile)
pm = pymupdf.Pixmap(imgfile)
--
2.43.0.710.g31023adb55
2.45.0.126.g110af8c3bd

View File

@ -1,10 +1,11 @@
%global pypi_name PyMuPDF
%global module_name fitz
%global module_name pymupdf
%global module_name_compat fitz
%bcond docs %{defined fedora}
Name: python-%{pypi_name}
Version: 1.24.2
Version: 1.24.4
Release: %autorelease
Summary: Python binding for MuPDF - a lightweight PDF and XPS viewer
@ -48,6 +49,7 @@ quality. With PyMuPDF you therefore can also access files with extensions
Summary: %{summary}
# provide the importable module:
%py_provides python3-%{module_name}
%py_provides python3-%{module_name_compat}
# upstream pyproject.toml is borked so add manually:
Requires: python3-mupdf
@ -112,6 +114,7 @@ SKIP="$SKIP and not test_insert and not test_3087"
%{_bindir}/pymupdf
%{python3_sitearch}/%{module_name}/
%{python3_sitearch}/PyMuPDF*
%{python3_sitearch}/%{module_name_compat}/
%if %{with docs}
%files doc

View File

@ -1 +1 @@
SHA512 (PyMuPDF-1.24.2.tar.gz) = 35fe5ac731aa3b6e8ca8c8468498d48cc8481eedd274b0067f7ca8586201a7a5128aff334ee934eff5214ba0b7f5825c07f30ced3587e43a6465dc7a261c6a27
SHA512 (PyMuPDF-1.24.4.tar.gz) = 5f45d23ae571fa41d153e95350d8e91f3ebc51c6ee21696627c6e58446e7d9574145802ae888e1486e8b27a0fc40c3b0644fb71f484995278699fb32b91a91ed