From 4125f956c796c5d700bbdf43ee24278c2bfda18e Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Tue, 5 Aug 2025 13:13:10 +0200 Subject: [PATCH 1/6] fix: fixed failing linkDest for file links in following format '#page=1&view=Fit' --- src/__init__.py | 5 ++++- src_classic/helper-python.i | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/__init__.py b/src/__init__.py index 8fc3f3c9f..659bc92eb 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -6780,7 +6780,10 @@ def uri_to_dict(uri): if ftab[1].startswith("page="): self.kind = LINK_GOTOR self.file_spec = ftab[0] - self.page = int(ftab[1][5:]) - 1 + page_part = ftab[1][5:] + if "&" in page_part: + page_part = page_part.split("&")[0] + self.page = int(page_part) - 1 else: self.is_uri = True self.kind = LINK_LAUNCH diff --git a/src_classic/helper-python.i b/src_classic/helper-python.i index 6ca431e18..87f0e6ae3 100644 --- a/src_classic/helper-python.i +++ b/src_classic/helper-python.i @@ -901,7 +901,10 @@ class linkDest(object): if ftab[1].startswith("page="): self.kind = LINK_GOTOR self.fileSpec = ftab[0] - self.page = int(ftab[1][5:]) - 1 + page_part = ftab[1][5:] + if "&" in page_part: + page_part = page_part.split("&")[0] + self.page = int(page_part) - 1 else: self.isUri = True self.kind = LINK_LAUNCH From c34ca24047fc5a368da7be8b83cc3cfe5643b2f5 Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Tue, 5 Aug 2025 13:35:23 +0200 Subject: [PATCH 2/6] fix: Update project version --- setup.py | 2 +- src/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4b4b6db46..34a272fba 100755 --- a/setup.py +++ b/setup.py @@ -1094,7 +1094,7 @@ def sdist(): # We generate different wheels depending on g_flavour. # -version = '1.23.26' +version = '1.23.26-hotfix' version_b = '1.23.22' tag_python = None diff --git a/src/__init__.py b/src/__init__.py index 659bc92eb..97813d937 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -21733,7 +21733,7 @@ def int_rc(text): return int(text) VersionFitz = "1.23.10" # MuPDF version. -VersionBind = "1.23.26" # PyMuPDF version. +VersionBind = "1.23.26-hotfix" # PyMuPDF version. VersionDate = "2024-02-29 00:00:01" VersionDate2 = VersionDate.replace('-', '').replace(' ', '').replace(':', '') version = (VersionBind, VersionFitz, VersionDate2) From eb98fc2534925e7ec49d05b11f38e98d0a16fef9 Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Tue, 5 Aug 2025 13:43:00 +0200 Subject: [PATCH 3/6] fix: Updated version according to PEP 440 --- setup.py | 2 +- src/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 34a272fba..132e0e2a2 100755 --- a/setup.py +++ b/setup.py @@ -1094,7 +1094,7 @@ def sdist(): # We generate different wheels depending on g_flavour. # -version = '1.23.26-hotfix' +version = '1.23.26+hotfix' version_b = '1.23.22' tag_python = None diff --git a/src/__init__.py b/src/__init__.py index 97813d937..44c45863a 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -21733,7 +21733,7 @@ def int_rc(text): return int(text) VersionFitz = "1.23.10" # MuPDF version. -VersionBind = "1.23.26-hotfix" # PyMuPDF version. +VersionBind = "1.23.26+hotfix" # PyMuPDF version. VersionDate = "2024-02-29 00:00:01" VersionDate2 = VersionDate.replace('-', '').replace(' ', '').replace(':', '') version = (VersionBind, VersionFitz, VersionDate2) From 8827e05a0242b1069a5bb0a9711954ab93a2cb08 Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Tue, 5 Aug 2025 13:54:42 +0200 Subject: [PATCH 4/6] fix: updated version --- setup.py | 2 +- src/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 132e0e2a2..41e4a4b45 100755 --- a/setup.py +++ b/setup.py @@ -1094,7 +1094,7 @@ def sdist(): # We generate different wheels depending on g_flavour. # -version = '1.23.26+hotfix' +version = '1.23.26.1' version_b = '1.23.22' tag_python = None diff --git a/src/__init__.py b/src/__init__.py index 44c45863a..c0b7f96f4 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -21733,7 +21733,7 @@ def int_rc(text): return int(text) VersionFitz = "1.23.10" # MuPDF version. -VersionBind = "1.23.26+hotfix" # PyMuPDF version. +VersionBind = "1.23.26.1" # PyMuPDF version. VersionDate = "2024-02-29 00:00:01" VersionDate2 = VersionDate.replace('-', '').replace(' ', '').replace(':', '') version = (VersionBind, VersionFitz, VersionDate2) From 11058252f6060aaa342b688d8ffe49a728095f87 Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Tue, 5 Aug 2025 14:00:31 +0200 Subject: [PATCH 5/6] fix: fix setup.py --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 41e4a4b45..0d8661eef 100755 --- a/setup.py +++ b/setup.py @@ -758,6 +758,11 @@ def build_mupdf_unix( mupdf_local, env, build_type): env_add(env, 'XCFLAGS', archflags) env_add(env, 'XLIBS', archflags) + # Add compiler flags to handle C23 compatibility issues on macOS + if darwin: + env_add(env, 'XCFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype') + env_add(env, 'XCXXFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype') + # We specify a build directory path containing 'pymupdf' so that we # coexist with non-PyMuPDF builds (because PyMuPDF builds have a # different config.h). From 1eb020e4aaf1bcbd7ec2f89cbbf2006d8b1d4d1e Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Tue, 5 Aug 2025 14:02:03 +0200 Subject: [PATCH 6/6] fix: fix setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0d8661eef..eb9fc8a5d 100755 --- a/setup.py +++ b/setup.py @@ -760,8 +760,8 @@ def build_mupdf_unix( mupdf_local, env, build_type): # Add compiler flags to handle C23 compatibility issues on macOS if darwin: - env_add(env, 'XCFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype') - env_add(env, 'XCXXFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype') + env_add(env, 'XCFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype -Wno-macro-redefined -Wno-error=macro-redefined') + env_add(env, 'XCXXFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype -Wno-macro-redefined -Wno-error=macro-redefined') # We specify a build directory path containing 'pymupdf' so that we # coexist with non-PyMuPDF builds (because PyMuPDF builds have a