Skip to content

Commit d2a78d0

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! squash! fixup! Fix CI regressions
1 parent dd2536f commit d2a78d0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ jobs:
267267
libdrm-devel mesa-libgbm-devel libusb-devel
268268
git clone https://github.com/libsdl-org/SDL.git sdl_repo &&
269269
cmake -S sdl_repo -B sdl_build &&
270-
cmake --build sdl_build --config Release &&
270+
cmake --build sdl_build --config Release --prefix / &&
271271
cmake --install sdl_build --config Release --prefix /
272272
CIBW_BEFORE_TEST: pip install numpy
273273
CIBW_TEST_COMMAND: python -c "import tcod.context"

build_sdl.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def on_directive_handle(
268268
assert matches
269269

270270
for match in matches:
271-
if Path(match, "SDL3/SDL_stdinc.h").is_file():
271+
if Path(match, "SDL3/SDL.h").is_file():
272272
SDL_INCLUDE = match
273273
break
274274
else:
@@ -301,7 +301,6 @@ def get_cdef() -> tuple[str, dict[str, str]]:
301301
parser = SDLParser()
302302
parser.add_path(temp_dir)
303303
parser.add_path(SDL_INCLUDE)
304-
assert Path(SDL_INCLUDE, "SDL3/SDL.h").exists(), SDL_INCLUDE
305304
parser.parse(
306305
"""
307306
// Remove extern keyword.
@@ -315,9 +314,14 @@ def get_cdef() -> tuple[str, dict[str, str]]:
315314
316315
#define SDL_oldnames_h_
317316
318-
#include <SDL3/SDL.h>
319317
"""
320318
)
319+
if (SDL_INCLUDE / "SDL3/SDL.h").exists(): # Regular path
320+
parser.parse("#include <SDL3/SDL.h>\n")
321+
elif (SDL_INCLUDE / "SDL.h").exists(): # Using MacOS dmg archive
322+
parser.parse("#include <SDL.h>\n")
323+
else:
324+
raise AssertionError(SDL_INCLUDE)
321325
sdl_cdef = parser.get_output()
322326

323327
sdl_cdef = RE_VAFUNC.sub("", sdl_cdef)

0 commit comments

Comments
 (0)