1717
1818BITSIZE , LINKAGE = platform .architecture ()
1919
20+ SDL_MIN_VERSION = (2 , 0 , 10 )
2021# The SDL2 version to parse and export symbols from.
21- SDL2_PARSE_VERSION = os .environ .get ("SDL_VERSION" , "2.0.5 " )
22+ SDL2_PARSE_VERSION = os .environ .get ("SDL_VERSION" , "2.0.20 " )
2223# The SDL2 version to include in binary distributions.
23- SDL2_BUNDLE_VERSION = os .environ .get ("SDL_VERSION" , "2.0.14 " )
24+ SDL2_BUNDLE_VERSION = os .environ .get ("SDL_VERSION" , "2.0.20 " )
2425
2526
2627# Used to remove excessive newlines in debug outputs.
5253 "SDL_DEPRECATED" ,
5354 "SDL_INLINE" ,
5455 "SDL_FORCE_INLINE" ,
56+ "SDL_FALLTHROUGH" ,
5557 # Might show up in parsing and not in source.
5658 "SDL_ANDROID_EXTERNAL_STORAGE_READ" ,
5759 "SDL_ANDROID_EXTERNAL_STORAGE_WRITE" ,
@@ -68,8 +70,7 @@ def check_sdl_version() -> None:
6870 """Check the local SDL version on Linux distributions."""
6971 if not sys .platform .startswith ("linux" ):
7072 return
71- needed_version = SDL2_PARSE_VERSION
72- SDL_VERSION_NEEDED = tuple (int (n ) for n in needed_version .split ("." ))
73+ needed_version = f"{ SDL_MIN_VERSION [0 ]} .{ SDL_MIN_VERSION [1 ]} .{ SDL_MIN_VERSION [2 ]} "
7374 try :
7475 sdl_version_str = subprocess .check_output (["sdl2-config" , "--version" ], universal_newlines = True ).strip ()
7576 except FileNotFoundError :
@@ -80,7 +81,7 @@ def check_sdl_version() -> None:
8081 )
8182 print (f"Found SDL { sdl_version_str } ." )
8283 sdl_version = tuple (int (s ) for s in sdl_version_str .split ("." ))
83- if sdl_version < SDL_VERSION_NEEDED :
84+ if sdl_version < SDL_MIN_VERSION :
8485 raise RuntimeError ("SDL version must be at least %s, (found %s)" % (needed_version , sdl_version_str ))
8586
8687
0 commit comments