public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/cutter-re] rawhide: Fix FTBFS with Python 3.16 rhbz#2584233
Date: Wed, 25 Nov 2026 19:13:00 GMT [thread overview]
Message-ID: <179563398007.1.13423981785623123924.rpms-cutter-re-b91ad9cabebf@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/cutter-re
Branch : rawhide
Commit : b91ad9cabebf2945c16867b93c1a1835881573eb
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-11-25T14:52:56-03:00
Stats : +40/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/cutter-re/c/b91ad9cabebf2945c16867b93c1a1835881573eb?branch=rawhide
Log:
Fix FTBFS with Python 3.16 rhbz#2584233
Py_SetPythonHome() removed in Python 3.16, PyEval_InitThreads() in 3.13
Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
---
diff --git a/cutter-fix-build-against-python-3.16.patch b/cutter-fix-build-against-python-3.16.patch
new file mode 100644
index 0000000..ce0adb5
--- /dev/null
+++ b/cutter-fix-build-against-python-3.16.patch
@@ -0,0 +1,37 @@
+Subject: Fix build against Python 3.16
+
+Py_SetPythonHome() was removed in Python 3.16; PYTHONHOME is picked up
+from the environment only.
+
+PyEval_InitThreads() was removed in Python 3.13 and its existing version
+guard is broken (PY_MICRO_VERSION is not a C preprocessor macro, so the
+expression always evaluates true). Replace it with a correct
+PY_VERSION_HEX check.
+
+diff --git a/src/common/PythonManager.cpp b/src/common/PythonManager.cpp
+--- a/src/common/PythonManager.cpp
++++ b/src/common/PythonManager.cpp
+@@ -60,7 +60,11 @@ void PythonManager::initPythonHome()
+ if (!customPythonHome.isNull()) {
+ qInfo() << "PYTHONHOME =" << customPythonHome;
+ pythonHome = Py_DecodeLocale(customPythonHome.toLocal8Bit().constData(), nullptr);
++ // Py_SetPythonHome() was removed in Python 3.16; PYTHONHOME is
++ // picked up from the environment.
++#if PY_VERSION_HEX < 0x03100000
+ Py_SetPythonHome(pythonHome);
++#endif
+ }
+ }
+
+@@ -152,8 +156,9 @@ void PythonManager::initialize()
+ }
+ # endif
+ #endif
+- // This function is deprecated does nothing starting from Python 3.9
+-#if (PY_MAJOR_VERSION <= 3) && (PY_MICRO_VERSION < 9)
++ // PyEval_InitThreads() is a no-op starting from Python 3.9 and was
++ // removed in Python 3.13.
++#if PY_VERSION_HEX < 0x03090000
+ PyEval_InitThreads();
+ #endif
+ pyThreadStateCounter = 1; // we have the thread now => 1
diff --git a/cutter-re.spec b/cutter-re.spec
index aa89d51..6401cc0 100644
--- a/cutter-re.spec
+++ b/cutter-re.spec
@@ -20,6 +20,9 @@ Source2: cutter-re.appdata.xml
Patch0: cutter-qt612-uic.patch
# Fixed with help from LLMs
Patch1: cutter-fix-build-against-python-3.15.patch
+# Py_SetPythonHome() removed in Python 3.16, PyEval_InitThreads() in 3.13
+# https://bugzilla.redhat.com/show_bug.cgi?id=2584233
+Patch2: cutter-fix-build-against-python-3.16.patch
BuildRequires: clang
BuildRequires: cmake
reply other threads:[~2026-11-25 19:13 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=179563398007.1.13423981785623123924.rpms-cutter-re-b91ad9cabebf@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--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