1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
https://bugs.gentoo.org/983043
https://lists.gnupg.org/pipermail/gnupg-devel/2026-August/036421.html
As of 2026/09/21 this or an equivalent hasn't been merged upstream.
Description: Build with swig 4.5.0
Without this patch, the package FTBFS with swig 4.5.0. This is due to
the removal of the Python 2 compatibility macros in version 4.5.0.
According to the SWIG authors, these macros were retained in the
generated code (pyhead.swg) solely for user typemaps. All typemap
using these macros are updated to call the Python 3 C API
directly.
Author: Rafael Laboissi�re <rafael@debian.org>
Bug-Debian: https://bugs.debian.org/1145351
Forwarded: no
Last-Update: 2026-08-25
--- gpgmepy-2.0.0.orig/gpgme.i
+++ gpgmepy-2.0.0/gpgme.i
@@ -94,8 +94,8 @@
}
$1[i] = PyBytes_AsString(pyVector[i]);
}
- else if (PyString_Check(o))
- $1[i] = PyString_AsString(o);
+ else if (PyBytes_Check(o))
+ $1[i] = PyBytes_AsString(o);
else {
PyErr_Format(PyExc_TypeError,
"arg %d: list must contain only str or bytes, got %s "
@@ -316,8 +316,8 @@
if (PyLong_Check($input))
$1 = PyLong_AsLong($input);
#if PY_MAJOR_VERSION < 3
- else if (PyInt_Check($input))
- $1 = PyInt_AsLong($input);
+ else if (PyLong_Check($input))
+ $1 = PyLong_AsLong($input);
#endif
else {
PyErr_SetString(PyExc_TypeError, "Numeric argument expected");
@@ -341,8 +341,8 @@
$1 = PyLong_AsLong($input);
#endif
#if PY_MAJOR_VERSION < 3
- else if (PyInt_Check($input))
- $1 = PyInt_AsLong($input);
+ else if (PyLong_Check($input))
+ $1 = PyLong_AsLong($input);
#endif
else {
PyErr_SetString(PyExc_TypeError, "Numeric argument expected");
@@ -357,8 +357,8 @@
if (PyLong_Check($input))
tmp$argnum = PyLong_AsLong($input);
#if PY_MAJOR_VERSION < 3
- else if (PyInt_Check($input))
- tmp$argnum = PyInt_AsLong($input);
+ else if (PyLong_Check($input))
+ tmp$argnum = PyLong_AsLong($input);
#endif
else
{
|