community icon indicating copy to clipboard operation
community copied to clipboard

KEP002: Separate SDL2 Bindings from Kivy Project

Open Kovak opened this issue 12 years ago • 4 comments

Goals:

  • Establish CySDL2 Project Separate from the Kivy project

In order to achieve the SDL2 provider expansion, we are currently in the process of creating a Cython based binding of SDL2. These files are maintained inside the Kivy project itself, where they are not very useful for others. A bit of googling shows that there are a few other similar, skeletal Cython based SDL2 wrappers floating around in gists and projects: it is clear that there are users beyond Kivy that could benefit from our work. This seems to represent a perfect opportunity for Kivy to produce a standalone cython module that could benefit the overall Cython community in addition to our own projects.

Kivy’s Cython wrapper is already cleanly separated from the rest of the code base and it would not involve much effort to remove it completely and have it become a standalone module. This separation would not only ensure Kivy’s own code-base stays leaner, but make it easier to maintain the SDL2 wrapper while simultaneously lowering the barrier to entry for others to contribute to the project.

Finally, Kivy has already bet heavily on the Cython ecosystem, and contributing an important module like SDL2 to the greater user-base can only help encourage adoption of Cython: indirectly benefiting Kivy through more widespread use and understanding of Cython.

Problems:

  • Introducing another standalone module increases the complexity of Kivy installation. Dessant, Quanon, and Kovak discussed the possibility to mirror this code in the kivy project as a solution. Also theoretically we already require for user to have pygame, and so even requiring the separate install would represent the same amount of pain for users, as we will replace pygame with CySDL2. We are interested in getting more opinion on this point.
  • Existing python ports of SDL2 for python. There are at least 2 projects currently bringing SDL2 to python however they use Ctypes and cffi respectively. Neither of these are ideal for Kivy, and ultimately Cython offers more functionality as there is the possibility for users to interact with the code directly and efficiently in Cython.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Kovak avatar Jun 12 '14 05:06 Kovak

Can it be used from a Python module? Cython is cool, but we might as well take over the Python identity and just quietly use Cython in the "Python" modules. Cython is just esoteric enough to scare people away at first glance.

knappador avatar Jun 12 '14 06:06 knappador

They aren't looked upon highly, but it's possible to have a git submodule for referencing a standalone project. I don't look at a standalone project as something that inherently increases complexity, because there are organizational ways around it.

PhoenixWright avatar Jun 12 '14 06:06 PhoenixWright

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 07 '17 15:10 stale[bot]

After 9 years, closing this as stale.

Julian-O avatar Oct 29 '23 12:10 Julian-O