public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michael J Gruber <mjg@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/python-PyMuPDF] f44: Update to new upstream release 1.27.2.2 (rhbz#2446026)
Date: Wed, 03 Jun 2026 16:23:55 GMT	[thread overview]
Message-ID: <178050383561.1.13966847313729463871.rpms-python-PyMuPDF-077cc2becd06@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-PyMuPDF
            Branch : f44
            Commit : 077cc2becd062f1932202e5db8e6f39983e04a44
            Author : Michael J Gruber <mjg@fedoraproject.org>
            Date   : 2026-04-01T22:33:45+02:00
            Stats  : +87/-47 in 10 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-PyMuPDF/c/077cc2becd062f1932202e5db8e6f39983e04a44?branch=f44

            Log:
            Update to new upstream release 1.27.2.2 (rhbz#2446026)

- Works with mupdf 1.27.2
- Improved get_textpage_ocr()
- Various fixes

---
diff --git a/.gitignore b/.gitignore
index 19752ad..f8bb639 100644
--- a/.gitignore
+++ b/.gitignore
@@ -106,3 +106,4 @@
 /PyMuPDF-1.26.4.tar.gz
 /PyMuPDF-1.26.5.tar.gz
 /PyMuPDF-1.27.1.tar.gz
+/PyMuPDF-1.27.2.2.tar.gz

diff --git a/0001-adjust-tests-to-tesseract-5.5.1.patch b/0001-adjust-tests-to-tesseract-5.5.1.patch
index 4839204..a6544c1 100644
--- a/0001-adjust-tests-to-tesseract-5.5.1.patch
+++ b/0001-adjust-tests-to-tesseract-5.5.1.patch
@@ -1,5 +1,5 @@
-From 7ca90f8b660f292824725a9c6c79addc24850cfd Mon Sep 17 00:00:00 2001
-Message-ID: <7ca90f8b660f292824725a9c6c79addc24850cfd.1769800813.git.mjg@fedoraproject.org>
+From 735e1b2ebc83223287224ab3df08e2e5acb1d05c Mon Sep 17 00:00:00 2001
+Message-ID: <735e1b2ebc83223287224ab3df08e2e5acb1d05c.1772136348.git.mjg@fedoraproject.org>
 From: Michael J Gruber <mjg@fedoraproject.org>
 Date: Tue, 15 Jul 2025 17:21:56 +0200
 Subject: [PATCH] adjust tests to tesseract 5.5.1
@@ -31,5 +31,5 @@ index 11c38352..f94557b0 100644
                  pass
              else:
 -- 
-2.53.0.rc1.285.g12662c75d7
+2.53.0.546.g660574eaac
 

diff --git a/0001-fix-test_-font.patch b/0001-fix-test_-font.patch
index 99db979..3350e26 100644
--- a/0001-fix-test_-font.patch
+++ b/0001-fix-test_-font.patch
@@ -1,5 +1,5 @@
-From 41f1b681dc4411a5a547697804b5f44d7d5be18f Mon Sep 17 00:00:00 2001
-Message-ID: <41f1b681dc4411a5a547697804b5f44d7d5be18f.1769800835.git.mjg@fedoraproject.org>
+From bfe6ec95145551ca9e4d1f2dfb97cf498286bbae Mon Sep 17 00:00:00 2001
+Message-ID: <bfe6ec95145551ca9e4d1f2dfb97cf498286bbae.1772136358.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,7 +13,7 @@ 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 05f6db8c..833b77d5 100644
+index 96d070f1..f86ccac7 100644
 --- a/tests/test_general.py
 +++ b/tests/test_general.py
 @@ -188,9 +188,9 @@ def test_bug1971():
@@ -39,5 +39,5 @@ index 05f6db8c..833b77d5 100644
      bbox = font.glyph_bbox( 65)
      print( f'bbox={bbox!r}')
 -- 
-2.53.0.rc1.285.g12662c75d7
+2.53.0.546.g660574eaac
 

diff --git a/0001-setup.py-do-not-require-libclang-and-swig.patch b/0001-setup.py-do-not-require-libclang-and-swig.patch
index 6eb308f..bd9c488 100644
--- a/0001-setup.py-do-not-require-libclang-and-swig.patch
+++ b/0001-setup.py-do-not-require-libclang-and-swig.patch
@@ -1,5 +1,5 @@
-From c2977823e6d95a637dc9238e05a9c6c0eddf6239 Mon Sep 17 00:00:00 2001
-Message-ID: <c2977823e6d95a637dc9238e05a9c6c0eddf6239.1769800825.git.mjg@fedoraproject.org>
+From c3e6bebc690e3f5b0dd3baf88c40bcdae10f05bf Mon Sep 17 00:00:00 2001
+Message-ID: <c3e6bebc690e3f5b0dd3baf88c40bcdae10f05bf.1772136353.git.mjg@fedoraproject.org>
 From: Michael J Gruber <mjg@fedoraproject.org>
 Date: Thu, 31 Oct 2024 23:53:31 +0100
 Subject: [PATCH] setup.py: do not require libclang and swig
@@ -11,10 +11,10 @@ on Fedora), so do not add them to the requirements by default.
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/setup.py b/setup.py
-index 7b05f669..03defd91 100755
+index 5c7f698a..8f6124e7 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -1410,7 +1410,7 @@ else:
+@@ -1436,7 +1436,7 @@ else:
              # There are still of problems when building on old macos.
              ret.append('libclang==14.0.6')
          else:
@@ -23,7 +23,7 @@ index 7b05f669..03defd91 100755
          if msys2:
              print(f'msys2: pip install of swig does not build; assuming `pacman -S swig`.')
          elif openbsd:
-@@ -1423,7 +1423,7 @@ else:
+@@ -1448,7 +1448,7 @@ else:
              ret.append('swig==4.3.1')
          else:
              ret.append('swig')
@@ -33,5 +33,5 @@ index 7b05f669..03defd91 100755
  
  if PYMUPDF_SETUP_URL_WHEEL:
 -- 
-2.53.0.rc1.285.g12662c75d7
+2.53.0.546.g660574eaac
 

diff --git a/0001-src-__init__.py-fix-incorrect-generation-of-PDF-cont.patch b/0001-src-__init__.py-fix-incorrect-generation-of-PDF-cont.patch
new file mode 100644
index 0000000..3457b75
--- /dev/null
+++ b/0001-src-__init__.py-fix-incorrect-generation-of-PDF-cont.patch
@@ -0,0 +1,28 @@
+From 4ab033149948b124be450f653a1a1645f1094350 Mon Sep 17 00:00:00 2001
+Message-ID: <4ab033149948b124be450f653a1a1645f1094350.1775074125.git.mjg@fedoraproject.org>
+From: Julian Smith <julian.smith@artifex.com>
+Date: Mon, 30 Mar 2026 12:38:41 +0100
+Subject: [PATCH] src/__init__.py: fix incorrect generation of PDF content
+ "lineJoin j".
+
+This bug was introduced in release 1.27.2.2.
+---
+ src/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/__init__.py b/src/__init__.py
+index e3845575..d51472a6 100644
+--- a/src/__init__.py
++++ b/src/__init__.py
+@@ -15761,7 +15761,7 @@ class Shape:
+         if lineCap != 0:
+             self.draw_cont = f"{lineCap} J\n" + self.draw_cont
+         if lineJoin != 0:
+-            self.draw_cont = "{lineJoin} j\n" + self.draw_cont
++            self.draw_cont = f"{lineJoin} j\n" + self.draw_cont
+ 
+         if dashes not in (None, "", "[] 0"):
+             self.draw_cont = f"{dashes} d\n" + self.draw_cont
+-- 
+2.53.0.1300.gfe94a17884
+

diff --git a/0001-test_pixmap-adjust-to-turbojpeg.patch b/0001-test_pixmap-adjust-to-turbojpeg.patch
index 8a16d7f..6c37c9a 100644
--- a/0001-test_pixmap-adjust-to-turbojpeg.patch
+++ b/0001-test_pixmap-adjust-to-turbojpeg.patch
@@ -1,5 +1,5 @@
-From 40fef2e0bf7afbc168d1e4737dc3d494a52bb81e Mon Sep 17 00:00:00 2001
-Message-ID: <40fef2e0bf7afbc168d1e4737dc3d494a52bb81e.1769800831.git.mjg@fedoraproject.org>
+From 2aa84040e144958aff4ba74610a0f58e034b2b9c Mon Sep 17 00:00:00 2001
+Message-ID: <2aa84040e144958aff4ba74610a0f58e034b2b9c.1772136355.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,10 +12,10 @@ format.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/tests/test_pixmap.py b/tests/test_pixmap.py
-index 76e564c0..d48589fa 100644
+index bfbf3c56..ee179b8e 100644
 --- a/tests/test_pixmap.py
 +++ b/tests/test_pixmap.py
-@@ -105,7 +105,7 @@ def test_color_count():
+@@ -106,7 +106,7 @@ def test_color_count():
      e.g. in Linux system installs.
      '''
      pm = pymupdf.Pixmap(imgfile)
@@ -25,5 +25,5 @@ index 76e564c0..d48589fa 100644
  def test_memoryview():
      pm = pymupdf.Pixmap(imgfile)
 -- 
-2.53.0.rc1.285.g12662c75d7
+2.53.0.546.g660574eaac
 

diff --git a/0001-tests-adjust-to-verbose-font-warning.patch b/0001-tests-adjust-to-verbose-font-warning.patch
index 2172e23..d1c6441 100644
--- a/0001-tests-adjust-to-verbose-font-warning.patch
+++ b/0001-tests-adjust-to-verbose-font-warning.patch
@@ -1,5 +1,5 @@
-From 39eb692c66af0a24f59baa65c89f1d342040a45b Mon Sep 17 00:00:00 2001
-Message-ID: <39eb692c66af0a24f59baa65c89f1d342040a45b.1769800819.git.mjg@fedoraproject.org>
+From a61a624e113d4764ac59f5f3bee09a1c4ba46303 Mon Sep 17 00:00:00 2001
+Message-ID: <a61a624e113d4764ac59f5f3bee09a1c4ba46303.1772136351.git.mjg@fedoraproject.org>
 From: Michael J Gruber <mjg@fedoraproject.org>
 Date: Wed, 4 Jun 2025 15:30:42 +0200
 Subject: [PATCH] tests: adjust to verbose font warning
@@ -36,7 +36,7 @@ index 1b7fd4a9..3bde1a4e 100644
 -        assert wt == 'bogus font ascent/descent values (0 / 0)\n... repeated 5 times...'
 +        assert 'bogus font ascent/descent values (0 / 0)' in wt
 diff --git a/tests/test_general.py b/tests/test_general.py
-index 833b77d5..d30c647a 100644
+index f86ccac7..52c885a9 100644
 --- a/tests/test_general.py
 +++ b/tests/test_general.py
 @@ -73,7 +73,7 @@ def test_iswrapped():
@@ -67,10 +67,10 @@ index 833b77d5..d30c647a 100644
  def test_font():
      font = pymupdf.Font(ordering=0)
 diff --git a/tests/test_pixmap.py b/tests/test_pixmap.py
-index d48589fa..040f32d4 100644
+index ee179b8e..22d9c38c 100644
 --- a/tests/test_pixmap.py
 +++ b/tests/test_pixmap.py
-@@ -198,7 +198,7 @@ def test_3050():
+@@ -199,7 +199,7 @@ def test_3050():
          assert rms == 0
          wt = pymupdf.TOOLS.mupdf_warnings()
          if (1, 26, 0) <= pymupdf.mupdf_version_tuple < (1, 27):
@@ -79,7 +79,7 @@ index d48589fa..040f32d4 100644
          else:
              assert wt == 'PDF stream Length incorrect'
  
-@@ -526,7 +526,7 @@ def test_4435():
+@@ -537,7 +537,7 @@ def test_4435():
              pixmap = page.get_pixmap(alpha=False, dpi=120)
          print(f'Called page.get_pixmap().', flush=1)
      if pymupdf.mupdf_version_tuple < (1, 27):
@@ -89,19 +89,19 @@ index d48589fa..040f32d4 100644
  
  def test_4423():
 diff --git a/tests/test_tables.py b/tests/test_tables.py
-index 9e4fdb86..700bc0b3 100644
+index d5fa5ef7..308035c5 100644
 --- a/tests/test_tables.py
 +++ b/tests/test_tables.py
-@@ -185,8 +185,7 @@ def test_2979():
- 
-     wt = pymupdf.TOOLS.mupdf_warnings()
-     assert (
--        wt
--        == "bogus font ascent/descent values (3117 / -2463)\n... repeated 2 times..."
-+        "bogus font ascent/descent values" in wt
-     )
+@@ -188,8 +188,7 @@ def test_2979():
+         assert ( wt == '' )
+     else:
+         assert (
+-            wt
+-            == "bogus font ascent/descent values (3117 / -2463)\n... repeated 2 times..."
++            "bogus font ascent/descent values" in wt
+         )
  
  
 -- 
-2.53.0.rc1.285.g12662c75d7
+2.53.0.546.g660574eaac
 

diff --git a/0001-tests-conftest-do-not-call-pip.patch b/0001-tests-conftest-do-not-call-pip.patch
index bf08466..1450e8a 100644
--- a/0001-tests-conftest-do-not-call-pip.patch
+++ b/0001-tests-conftest-do-not-call-pip.patch
@@ -1,5 +1,5 @@
-From 532391c6d31080dc5b7b8af81eb89e3885ceacea Mon Sep 17 00:00:00 2001
-Message-ID: <532391c6d31080dc5b7b8af81eb89e3885ceacea.1769800794.git.mjg@fedoraproject.org>
+From 85192c321adc855606eab63da47dcefdbc3f9f9b Mon Sep 17 00:00:00 2001
+Message-ID: <85192c321adc855606eab63da47dcefdbc3f9f9b.1772136344.git.mjg@fedoraproject.org>
 From: Michael J Gruber <mjg@fedoraproject.org>
 Date: Sat, 1 Nov 2025 22:32:10 +0100
 Subject: [PATCH] tests/conftest: do not call pip
@@ -10,7 +10,7 @@ Oh well ...
  1 file changed, 1 deletion(-)
 
 diff --git a/tests/conftest.py b/tests/conftest.py
-index 44c5e4d0..371038eb 100644
+index c79e6990..3a4ae7a4 100644
 --- a/tests/conftest.py
 +++ b/tests/conftest.py
 @@ -36,7 +36,6 @@ def install_required_packages():
@@ -19,8 +19,8 @@ index 44c5e4d0..371038eb 100644
  
 -install_required_packages()
  
- # Need to import pymupdf only after we've installed pymupdf-fonts above,
- # because pymupdf imports pymupdf_fonts, and copes with import failure.
+ 
+ @pytest.fixture(scope="session", autouse=True)
 -- 
-2.53.0.rc1.285.g12662c75d7
+2.53.0.546.g660574eaac
 

diff --git a/python-PyMuPDF.spec b/python-PyMuPDF.spec
index 0e8b957..e12978b 100644
--- a/python-PyMuPDF.spec
+++ b/python-PyMuPDF.spec
@@ -8,7 +8,7 @@
 %bcond barcode 0%{?fedora} 
 
 Name:		python-%{pypi_name}
-Version:	1.27.1
+Version:	1.27.2.2
 Release:	%autorelease
 Summary:	Python binding for MuPDF - a lightweight PDF and XPS viewer
 
@@ -24,6 +24,8 @@ Patch:		0001-setup.py-do-not-require-libclang-and-swig.patch
 Patch:		0001-tests-adjust-to-verbose-font-warning.patch
 Patch:		0001-adjust-tests-to-tesseract-5.5.1.patch
 Patch:		0001-tests-conftest-do-not-call-pip.patch
+# Upstream patches from main branch:
+Patch:		0001-src-__init__.py-fix-incorrect-generation-of-PDF-cont.patch
 
 # test dependencies not picked up by generator
 BuildRequires:	python3dist(pillow)
@@ -131,8 +133,15 @@ SKIP="$SKIP and not test_4180 and not test_4613 and not test_htmlbox1"
 SKIP="$SKIP and not test_4445 and not test_4457 and not test_4533 and not test_4702"
 # test requires additional packages
 SKIP="$SKIP and not test_4751"
-# Fedora's swig returns different results
+# test fails on *EL after PyMuPDF change
+%if 0%{?rhel}
+SKIP="$SKIP and not test_3842"
+%endif
+# Fedora's earlier swig may return different results
+%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11
+%else
 SKIP="$SKIP and not test_4392"
+%endif
 %if %{without barcode}
 # we build mupdf without barcode support
 SKIP="$SKIP and not test_barcode"
@@ -149,10 +158,12 @@ SKIP="$SKIP and not test_4435"
 %endif
 # spuriously failing tests (several archs)
 SKIP="$SKIP and not test_insert and not test_3087"
-# tests are known to fail with mupdf 1.27.x (reported)
-sed -i -e '/^import pymupdf/i import pytest' tests/test_nonpdf.py
-sed -i -e '/^def test_layout/i @pytest.mark.xfail(reason="mupdf 1.27.x", strict=True)' tests/test_nonpdf.py
-sed -i -e '/^def test_pageids/i @pytest.mark.xfail(reason="mupdf 1.27.x", strict=True)' tests/test_nonpdf.py
+# tests apply to >= 1.27.x only
+%if %["%copr_projectname" == "mupdf-git-1.26.x"]
+SKIP="$SKIP and not test_4599 and not test_4790 and not test_4907"
+%endif
+# tests are known to fail on newer Fedoras (reported)
+SKIP="$SKIP and not test_layout and not test_pageids"
 export PYMUPDF_SYSINSTALL_TEST=1
 %pytest -k "$SKIP"
 

diff --git a/sources b/sources
index c835e29..a361f5a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (PyMuPDF-1.27.1.tar.gz) = f68fe810ce39a3612ec279e57270887f4d8d0425dfcd0356c775e30464708a0d867412f8a4da6e9dac164662df3f597b7d76b8366c7d222e813875e201b6cdaa
+SHA512 (PyMuPDF-1.27.2.2.tar.gz) = 6a88cbe7187be13abf4154d5761a16aa7301e37c887d0968d8d8bc49ad9787ff989bb82eea968741af6889e46d699a32487d356aa93f9bfdf522ef8d1347b57a

                 reply	other threads:[~2026-06-03 16:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178050383561.1.13966847313729463871.rpms-python-PyMuPDF-077cc2becd06@fedoraproject.org \
    --to=mjg@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox