Hi, the attached patch seems to fix the FTBFS with Python 3. I am not completely sure it is the right fix, though, meaning that the package compiles with my patch, but I am not sure the logic is correct.
Basically I am replacing PyInt_Check with PyLong_Check, under the assumption that "long" is the new name of "int" in Python 3. This assumptions is corroborated by PyGame having this line in /usr/include/python3.8m/pygame/pgcompat.h: #define PyInt_Check(op) PyLong_Check(op) That said, I wouldn't mind some competent Python developer to review the patch. Giovanni. -- Giovanni Mascellani <g.mascell...@gmail.com> Postdoc researcher - Université Libre de Bruxelles
diff --git a/python/enki.cpp b/python/enki.cpp index b18e6ea..216ae41 100644 --- a/python/enki.cpp +++ b/python/enki.cpp @@ -105,11 +105,11 @@ struct Vector_from_python PyObject* item0(PyTuple_GetItem(objPtr, 0)); assert (item0); - if (!(PyFloat_Check(item0) || PyInt_Check(item0))) + if (!(PyFloat_Check(item0) || PyLong_Check(item0))) return 0; PyObject* item1(PyTuple_GetItem(objPtr, 1)); assert (item1); - if (!(PyFloat_Check(item1) || PyInt_Check(item1))) + if (!(PyFloat_Check(item1) || PyLong_Check(item1))) return 0; } else @@ -120,11 +120,11 @@ struct Vector_from_python PyObject* item0(PyList_GetItem(objPtr, 0)); assert (item0); - if (!(PyFloat_Check(item0) || PyInt_Check(item0))) + if (!(PyFloat_Check(item0) || PyLong_Check(item0))) return 0; PyObject* item1(PyList_GetItem(objPtr, 1)); assert (item1); - if (!(PyFloat_Check(item1) || PyInt_Check(item1))) + if (!(PyFloat_Check(item1) || PyLong_Check(item1))) return 0; }
signature.asc
Description: OpenPGP digital signature