From 88e3e689cab13c24904a51c46e7140363e6e5858 Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Wed, 18 Mar 2015 15:30:32 -0400 Subject: [PATCH] Fix incorrect directory splitting on win to use semi-colon. --- setup.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 606919b40..80d0cbebb 100644 --- a/setup.py +++ b/setup.py @@ -534,13 +534,18 @@ def determine_sdl2(): # no pkgconfig info, or we want to use a specific sdl2 path, so perform # manual configuration flags['libraries'] = ['SDL2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer'] - flags['include_dirs'] = (sdl2_path.split(':') if sdl2_path else - ['/usr/local/include/SDL2', '/usr/include/SDL2']) + split_chr = ';' if platform == 'win32' else ':' + sdl2_paths = sdl2_path.split(split_chr) if sdl2_path else [] + + flags['include_dirs'] = ( + sdl2_paths if sdl2_paths else + ['/usr/local/include/SDL2', '/usr/include/SDL2']) flags['extra_link_args'] = [] flags['extra_compile_args'] = [] - flags['extra_link_args'] += (['-L' + sdl2_path] if sdl2_path else - ['-L/usr/local/lib/']) + flags['extra_link_args'] += ( + ['-L' + p for p in sdl2_paths] if sdl2_paths else + ['-L/usr/local/lib/']) # ensure headers for all the SDL2 and sub libraries are available libs_to_check = ['SDL', 'SDL_mixer', 'SDL_ttf', 'SDL_image']