Skip to content

Commit 4396e66

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Test Pyodide builds
1 parent 7801569 commit 4396e66

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

build_sdl.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ def get_emscripten_include_dir() -> Path:
265265
raise AssertionError(os.environ["PATH"])
266266

267267

268+
if "PYODIDE" in os.environ:
269+
with TemporaryDirectory() as tmp_dir:
270+
blank_source = Path(tmp_dir, "blank.c")
271+
blank_source.write_text("")
272+
subprocess.run(["emcc", "--use-port=sdl3", blank_source], check=True)
273+
268274
check_sdl_version()
269275

270276
SDL_PARSE_PATH: Path | None = None
@@ -398,12 +404,7 @@ def get_cdef() -> tuple[str, dict[str, str]]:
398404
extra_link_args += ["-rpath", "/usr/local/opt/llvm/lib/"]
399405

400406
if "PYODIDE" in os.environ:
401-
with TemporaryDirectory() as tmp_dir:
402-
blank_source = Path(tmp_dir, "blank.c")
403-
blank_source.write_text("")
404-
print(f"""EMCC CFLAGS: {subprocess.check_output(["emcc", "--use-port=sdl3", "--cflags"], text=True)!r}""")
405-
subprocess.run(["emcc", "--use-port=sdl3", blank_source], check=True)
406-
407+
print(f"""EMCC CFLAGS: {subprocess.check_output(["emcc", "--use-port=sdl3", "--cflags"], text=True)!r}""")
407408
extra_compile_args += ["--use-port=sdl3"]
408409
extra_link_args += ["--use-port=sdl3"]
409410
cmake_cmd = ("cmake", "--find-package", "-D", "NAME=SDL3", "-D", "COMPILER_ID=GNU", "-D", "LANGUAGE=C")

0 commit comments

Comments
 (0)