Package: pyode
Version: 1.2.0.dev15-4
Severity: grave
Tags: patch
Justification: renders package unusable
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: bdr...@debian.org

Dear Maintainer,

the python3-pyode package is empty, because it silently fails to build
with Cython 3.

In Ubuntu, the attached patch was applied to achieve the following:

  * Add support for Cython 3 to fix building the Python module.


Thanks for considering the patch.

-- 
Benjamin Drung
Debian & Ubuntu Developer
diff -Nru pyode-1.2.0.dev15/debian/patches/Add-support-for-Cython-3.patch 
pyode-1.2.0.dev15/debian/patches/Add-support-for-Cython-3.patch
--- pyode-1.2.0.dev15/debian/patches/Add-support-for-Cython-3.patch     
1970-01-01 01:00:00.000000000 +0100
+++ pyode-1.2.0.dev15/debian/patches/Add-support-for-Cython-3.patch     
2024-04-05 02:21:29.000000000 +0200
@@ -0,0 +1,35 @@
+From: Benjamin Drung <benjamin.dr...@canonical.com>
+Date: Fri, 5 Apr 2024 02:21:21 +0200
+Subject: Add support for Cython 3
+
+See 
https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html
+
+Signed-off-by: Benjamin Drung <benjamin.dr...@canonical.com>
+---
+ src/declarations.pyx | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/declarations.pyx b/src/declarations.pyx
+index b69a0e1..f274ad6 100755
+--- a/src/declarations.pyx
++++ b/src/declarations.pyx
+@@ -80,8 +80,8 @@ cdef extern from "ode/ode.h":
+         dVector3 f2
+         dVector3 t2
+ 
+-    ctypedef void dNearCallback(void* data, dGeomID o1, dGeomID o2)
+-    ctypedef dReal dHeightfieldGetHeight( void* p_user_data, int x, int z )
++    ctypedef void dNearCallback(void* data, dGeomID o1, dGeomID o2) except *
++    ctypedef dReal dHeightfieldGetHeight( void* p_user_data, int x, int z ) 
except *
+ 
+     ctypedef void dGetAABBFn (dGeomID, dReal aabb[6])
+     ctypedef int dColliderFn (dGeomID o1, dGeomID o2, int flags, dContactGeom 
*contact, int skip)
+@@ -322,7 +322,7 @@ cdef extern from "ode/ode.h":
+     void dBodySetGravityMode (dBodyID b, int mode)
+     int dBodyGetGravityMode (dBodyID b)
+ 
+-    void dBodySetMovedCallback(dBodyID b, void (*callback)(dBodyID))
++    void dBodySetMovedCallback(dBodyID b, void (*callback)(dBodyID) except *)
+ 
+     dGeomID dBodyGetFirstGeom (dBodyID b)
+     dGeomID dBodyGetNextGeom (dGeomID g)
diff -Nru pyode-1.2.0.dev15/debian/patches/series 
pyode-1.2.0.dev15/debian/patches/series
--- pyode-1.2.0.dev15/debian/patches/series     2021-11-10 19:39:19.000000000 
+0100
+++ pyode-1.2.0.dev15/debian/patches/series     2024-04-05 02:21:29.000000000 
+0200
@@ -1,3 +1,4 @@
 01_fix_setup.patch
 02_add_shebang.patch
 03_spellings.patch
+Add-support-for-Cython-3.patch

Reply via email to