public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/xapian-bindings] rawhide: Fix FTBFS with Python 3.15 (rhbz#2417021)
@ 2026-07-15 20:18 Karolina Surma
  0 siblings, 0 replies; only message in thread
From: Karolina Surma @ 2026-07-15 20:18 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/xapian-bindings
            Branch : rawhide
            Commit : 5bddd164b383744281ee2b04fd0829fff6f7eb45
            Author : Karolina Surma <ksurma@redhat.com>
            Date   : 2026-07-09T07:55:53+02:00
            Stats  : +18/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/xapian-bindings/c/5bddd164b383744281ee2b04fd0829fff6f7eb45?branch=rawhide

            Log:
            Fix FTBFS with Python 3.15 (rhbz#2417021)

Assisted-By: Claude Opus 4.6

---
diff --git a/xapian-bindings.spec b/xapian-bindings.spec
index 93066ff..5da2a42 100644
--- a/xapian-bindings.spec
+++ b/xapian-bindings.spec
@@ -3,7 +3,7 @@
 
 Name:          xapian-bindings
 Version:       1.4.31
-Release:       2%{?dist}
+Release:       3%{?dist}
 Summary:       Bindings for the Xapian Probabilistic Information Retrieval Library
 
 # Automatically converted from old format: GPLv2+ - review is highly recommended.
@@ -14,8 +14,12 @@ Source0:       https://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.
 BuildRequires: gcc-c++
 BuildRequires: libuuid-devel
 BuildRequires: make
+BuildRequires: perl-interpreter
 BuildRequires: python3-devel python3-setuptools python3-sphinx
 BuildRequires: ruby ruby-devel rubygems rubygem-rdoc rubygem-json
+# swig 4.4.0+ contains a fix for PyThread_release_lock/PyThread_free_lock in Mutex destructor
+# needed for successful build with Python 3.15
+BuildRequires: swig >= 4.4.0
 BuildRequires: tcl-devel
 BuildRequires: xapian-core-devel
 BuildRequires: zlib-devel
@@ -77,6 +81,16 @@ export TCL_LIB=%{tcl_sitearch}
 
 %configure --with-python3 --with-ruby --with-tcl
 
+# Regenerate Python's SWIG wrapper with system swig
+pushd python3
+swig -DSWIG_PYTHON_LEGACY_BOOL \
+     $(xapian-config --swigflags) \
+     -I. -c++ -python -threads -shadow -O \
+     -o xapian_wrap.cc python.i
+perl fixup-swig-py3-wrapper xapian.py > xapian__init__.py
+rm xapian.py
+popd
+
 %{make_build}
 
 %install
@@ -103,6 +117,9 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name}
 %{tcl_sitearch}/xapian%{version}/
 
 %changelog
+* Fri Jul 03 2026 Karolina Surma <ksurma@redhat.com> - 1.4.31-3
+- Regenerate SWIG wrapper at build time with swig >= 4.4.0 (rhbz#2417021)
+
 * Wed Feb 25 2026 Christiano Anderson <chris@christiano.me> - 1.4.31-2
 - Rebuild to 1.4.31
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-15 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 20:18 [rpms/xapian-bindings] rawhide: Fix FTBFS with Python 3.15 (rhbz#2417021) Karolina Surma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox