Skip to content

Commit 135955d

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! squash! fixup! Fix CI regressions
1 parent b248dda commit 135955d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
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 --prefix / &&
270+
cmake --build sdl_build --config Release &&
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: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,15 @@ def get_cdef() -> tuple[str, dict[str, str]]:
301301
parser = SDLParser()
302302
parser.add_path(temp_dir)
303303
parser.add_path(SDL_INCLUDE)
304-
if Path(SDL_INCLUDE, "SDL3/SDL.h").exists(): # Regular path
305-
sdl3_header = "SDL3/SDL.h"
306-
elif Path(SDL_INCLUDE, "SDL.h").exists(): # Using MacOS dmg archive
307-
sdl3_header = "SDL.h"
308-
else:
309-
raise AssertionError(SDL_INCLUDE)
304+
if Path(SDL_INCLUDE, "../Headers/SDL.h").exists(): # Using MacOS dmg archive
305+
for file in SDL_INCLUDE.glob("SDL*.h"):
306+
if file.name == "SDL_oldnames.h":
307+
continue
308+
shutil.copyfile(file, fake_header_dir / file.name)
309+
else: # Regular path
310+
assert Path(SDL_INCLUDE, "SDL3/SDL.h").exists(), SDL_INCLUDE
310311
parser.parse(
311-
f"""
312+
"""
312313
// Remove extern keyword.
313314
#define extern
314315
// Ignore some SDL assert statements.
@@ -320,7 +321,7 @@ def get_cdef() -> tuple[str, dict[str, str]]:
320321
321322
#define SDL_oldnames_h_
322323
323-
#include <{sdl3_header}>
324+
#include <SDL3/SDL.h>
324325
"""
325326
)
326327
sdl_cdef = parser.get_output()

0 commit comments

Comments
 (0)