Skip to content

Commit 8925da0

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! Parse SDL headers from EMSDK during Pyodide builds
1 parent 841e1d3 commit 8925da0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

build_sdl.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,15 @@ def on_directive_handle(
261261

262262
SDL_INCLUDE: Path
263263
if "PYODIDE" in os.environ:
264-
logger.info(f"{os.environ.get('EMSDK')=}")
265-
logger.info(f"{os.environ.get('EMSCRIPTEN')=}")
266-
logger.info(f"{os.environ.get('EMSCRIPTEN_ROOT')=}")
267-
logger.info(f"{os.environ.get('PATH')=}")
268-
logger.info(f"{os.environ}")
264+
import pprint
265+
266+
pprint.pprint(dict(os.environ))
267+
for path in os.environ["PATH"].split(os.pathsep):
268+
if Path(path, "../upstream/emscripten").exists():
269+
SDL_INCLUDE = Path(path)
270+
break
271+
else:
272+
raise AssertionError
269273
SDL_INCLUDE = Path(os.environ["EMSCRIPTEN"], "include")
270274
elif sys.platform == "win32" and SDL_PARSE_PATH is not None:
271275
SDL_INCLUDE = SDL_PARSE_PATH / "include"

0 commit comments

Comments
 (0)