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/python-pykcs11] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
Date: Wed, 29 Jul 2026 09:47:42 GMT	[thread overview]
Message-ID: <178531846242.1.9090000037119177030.rpms-python-pykcs11-c1bb580b7673@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-pykcs11
Branch : rawhide
Commit : c1bb580b76736c166f46c50fbc660d7c5dcaf663
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2026-07-28T15:29:18+02:00
Stats  : +16/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pykcs11/c/c1bb580b76736c166f46c50fbc660d7c5dcaf663?branch=rawhide

Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility

---
diff --git a/python-pykcs11-swig45.patch b/python-pykcs11-swig45.patch
new file mode 100644
index 0000000..d028d61
--- /dev/null
+++ b/python-pykcs11-swig45.patch
@@ -0,0 +1,12 @@
+diff -up pykcs11-1.5.15/src/pykcs11.i.swig45 pykcs11-1.5.15/src/pykcs11.i
+--- pykcs11-1.5.15/src/pykcs11.i.swig45	2026-07-28 10:30:08.011623357 +0200
++++ pykcs11-1.5.15/src/pykcs11.i	2026-07-28 10:30:08.016623459 +0200
+@@ -63,7 +63,7 @@ using namespace std;
+ }
+ 
+ %typemap(out) CK_RV {
+-   $result = PyInt_FromLong((long)$1);
++   $result = PyLong_FromLong((long)$1);
+ }
+ 
+ #else

diff --git a/python-pykcs11.spec b/python-pykcs11.spec
index f846d93..92abeeb 100644
--- a/python-pykcs11.spec
+++ b/python-pykcs11.spec
@@ -18,6 +18,9 @@ Source:         %{pypi_source}
 # Add Fedora PyKCS11 library location search path
 # https://github.com/LudovicRousseau/PyKCS11/pull/113
 Patch:          %{url}/pull/113.patch#/Add-Fedora-PyKCS11-library-location-search-path.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch:          python-pykcs11-swig45.patch
 
 BuildRequires:  gcc-c++
 BuildRequires:  python3-devel
@@ -51,7 +54,7 @@ BuildArch:      noarch
 Documentation for %{pypi_name}.
 
 %prep
-%autosetup -n pykcs11-%{version}
+%autosetup -p1 -n pykcs11-%{version}
 # rpmlint fixes
 #   * E: env-script-interpreter
 #     - Remove shebang from Python libraries

                 reply	other threads:[~2026-07-29  9:47 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=178531846242.1.9090000037119177030.rpms-python-pykcs11-c1bb580b7673@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