I managed to get SDL2 working with Kivy 1.9.2 on OSX 10.12.2 using the following procedure. This assumes brew installed python 2.7 and brew installed SDL2.
1) Download the Kivy source (in the directory / usr / local / lib / python 2.7 / site-packages)
git clone https://github.com/kivy/kivy cd kivy
2) Set environment variables to tell Kivy where to find the bundled SDL2 libraries, rather than use the path to the OSX infrastructure and actually use SDL2 and build Kivy.
KIVY_SDL2_PATH=/usr/local/lib USE_OSX_FRAMEWORKS=0 USE_SDL2=1 make force
Now, by running the main script, you should see that the Windows provider is SDL2.
bash-3.2$ python main.py [WARNING] [Config ] Older configuration version detected (14 instead of 17) [WARNING] [Config ] Upgrading configuration in progress. [INFO ] [Kivy ] v1.9.2-dev0 [INFO ] [Python ] v2.7.13 (default, Jan 23 2017, 19:04:34) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] [INFO ] [Factory ] 193 symbols loaded [INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored) [INFO ] [OSC ] using <multiprocessing> for socket [INFO ] [Window ] Provider: sdl2
Using SDL2 over pygame provides retina support and fixes issues like black screen when resizing a window.
source share