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] rawhide: simplify swig/clang dependency
Date: Sun, 19 Jul 2026 14:05:52 GMT	[thread overview]
Message-ID: <178446995297.1.4382719600973505912.rpms-python-PyMuPDF-faeb64948ba9@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-PyMuPDF
            Branch : rawhide
            Commit : faeb64948ba954ce999825dcd09b9cf8eca908b1
            Author : Michael J Gruber <mjg@fedoraproject.org>
            Date   : 2026-07-16T20:14:06+02:00
            Stats  : +1/-43 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-PyMuPDF/c/faeb64948ba954ce999825dcd09b9cf8eca908b1?branch=rawhide

            Log:
            simplify swig/clang dependency

On all Fedoras, python3dist(swig) is provided now. So we do not need to
patch out the dependency on 'swig' in setup.py any more. Since this
pulls in all we need, we can override the dependency on 'libclang' by
'swig' and drop the patch completely. This does not change which
packages we actually build against.

[skip changelog]

---
diff --git a/0001-setup.py-do-not-require-libclang-and-swig.patch b/0001-setup.py-do-not-require-libclang-and-swig.patch
deleted file mode 100644
index bd9c488..0000000
--- a/0001-setup.py-do-not-require-libclang-and-swig.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-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
-
-libclang and swig may be present but under different package names (e.g.
-on Fedora), so do not add them to the requirements by default.
----
- setup.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 5c7f698a..8f6124e7 100755
---- a/setup.py
-+++ b/setup.py
-@@ -1436,7 +1436,7 @@ else:
-             # There are still of problems when building on old macos.
-             ret.append('libclang==14.0.6')
-         else:
--            ret.append('libclang')
-+            pass
-         if msys2:
-             print(f'msys2: pip install of swig does not build; assuming `pacman -S swig`.')
-         elif openbsd:
-@@ -1448,7 +1448,7 @@ else:
-             ret.append('swig==4.3.1')
-         else:
-             ret.append('swig')
--        return ret
-+        return list()
- 
- 
- if PYMUPDF_SETUP_URL_WHEEL:
--- 
-2.53.0.546.g660574eaac
-

diff --git a/python-PyMuPDF.spec b/python-PyMuPDF.spec
index b91be1a..5444571 100644
--- a/python-PyMuPDF.spec
+++ b/python-PyMuPDF.spec
@@ -18,7 +18,6 @@ Source0:	%{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
 # Fedora specific patches:
 Patch:		0001-fix-test_-font.patch
 Patch:		0001-test_pixmap-adjust-to-turbojpeg.patch
-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
@@ -41,7 +40,6 @@ BuildRequires:	python3-furo
 BuildRequires:	rst2pdf
 %endif
 BuildRequires:	gcc gcc-c++
-BuildRequires:	swig
 BuildRequires:	zlib-devel
 BuildRequires:	mupdf-devel mupdf-cpp-devel
 BuildRequires:	freetype-devel
@@ -82,6 +80,7 @@ python-%{pypi_name}-doc contains documentation and examples for PyMuPDF
 sed -i -e "s/,'sphinxcontrib.googleanalytics'//" docs/conf.py
 
 %generate_buildrequires
+export PYMUPDF_SETUP_LIBCLANG='swig'
 %pyproject_buildrequires -R
 
 %build
@@ -150,10 +149,6 @@ SKIP="$SKIP and not test_4435"
 %endif
 # spuriously failing tests (several archs)
 SKIP="$SKIP and not test_insert and not test_3087"
-# 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

                 reply	other threads:[~2026-07-19 14:05 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=178446995297.1.4382719600973505912.rpms-python-PyMuPDF-faeb64948ba9@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