public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jitka Plesnikova <jplesnik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libcec] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
Date: Tue, 28 Jul 2026 16:49:21 GMT [thread overview]
Message-ID: <178525736192.1.12798557638698562439.rpms-libcec-bc7b6aeb31bf@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/libcec
Branch : rawhide
Commit : bc7b6aeb31bfc424c6d326f5bbb316f9fe21f69a
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-07-28T15:29:18+02:00
Stats : +34/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libcec/c/bc7b6aeb31bfc424c6d326f5bbb316f9fe21f69a?branch=rawhide
Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
---
diff --git a/libcec-swig45.patch b/libcec-swig45.patch
new file mode 100644
index 0000000..5617ef4
--- /dev/null
+++ b/libcec-swig45.patch
@@ -0,0 +1,26 @@
+diff -up libcec-libcec-8.0.0/src/libcec/libcec.i.swig45 libcec-libcec-8.0.0/src/libcec/libcec.i
+--- libcec-libcec-8.0.0/src/libcec/libcec.i.swig45 2026-07-28 09:30:38.390102964 +0200
++++ libcec-libcec-8.0.0/src/libcec/libcec.i 2026-07-28 09:30:38.393103024 +0200
+@@ -12,7 +12,7 @@
+ %ignore *::operator=;
+
+ %typemap(out) CEC::cec_osd_name {
+- $result = PyString_FromString($1.name);
++ $result = PyUnicode_FromString($1.name);
+ }
+
+ /////// libcec_configuration::strDeviceLanguage ///////
+diff -up libcec-libcec-8.0.0/src/libcec/SwigHelper.h.swig45 libcec-libcec-8.0.0/src/libcec/SwigHelper.h
+--- libcec-libcec-8.0.0/src/libcec/SwigHelper.h.swig45 2026-07-28 09:30:38.389102944 +0200
++++ libcec-libcec-8.0.0/src/libcec/SwigHelper.h 2026-07-28 09:30:38.392669050 +0200
+@@ -137,8 +137,8 @@ namespace CEC
+ Py_DECREF(arglist);
+ if (!!result)
+ {
+- if (PyInt_Check(result))
+- retval = (int)PyInt_AsLong(result);
++ if (PyLong_Check(result))
++ retval = (int)PyLong_AsLong(result);
+ Py_XDECREF(result);
+ }
+ }
diff --git a/libcec.spec b/libcec.spec
index fd951b0..6863d3f 100644
--- a/libcec.spec
+++ b/libcec.spec
@@ -1,11 +1,15 @@
Name: libcec
Version: 8.0.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Library and utilities for HDMI-CEC device control
License: GPL-2.0-or-later
URL: http://libcec.pulse-eight.com/
Source0: https://github.com/Pulse-Eight/%{name}/archive/%{name}-%{version}.tar.gz
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch0: libcec-swig45.patch
+
# Per i686 leaf package policy
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@@ -112,6 +116,9 @@ mv %{buildroot}%{_bindir}/cecc-client-%{version} %{buildroot}%{_bindir}/cecc-cli
%{python3_sitearch}/*
%changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 8.0.0-3
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
* Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 8.0.0-2
- Rebuilt for Python 3.15.0b4 ABI change
reply other threads:[~2026-07-28 16:49 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=178525736192.1.12798557638698562439.rpms-libcec-bc7b6aeb31bf@fedoraproject.org \
--to=jplesnik@redhat.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