Cython with Kivy for Android and iOS

416 views
Skip to first unread message

Antonio Peña

unread,
Mar 23, 2022, 7:28:29 PM3/23/22
to Kivy users support
Hello Community,

I've been looking around the Internet but couldn't find any tutorial or examples about the topic. Can you use Cython code in your Kivy application? Since Kivy itself uses Cython, I imagine you can. But how? Should I compile de .pyx file on the Linux's Virtual Machine or on Windows? The first one builds a .so file and the other a .pyd one. Is there any incompatibility when compiling then to an .apk with buildozer or to iOS with its process?

Thanks!

Robert

unread,
Mar 23, 2022, 9:43:07 PM3/23/22
to Kivy users support
If the target is Android create a local recipe with base class CythonRecipe and all the compile stuff is handled.
In principle very similar code would work for kivy-ios, in practice .....?
Recipe help is non existent so you need to be self supporting.

Some of these are examples of using CythonRecipe
https://github.com/Android-for-Python/Android-for-Python-Users#appendix-c--locally-modifying-a-recipe
Reply all
Reply to author
Forward
0 new messages