Skip to content

Commit 6f9cb09

Browse files
committed
fixup! Build Pyodide wheel
1 parent bc94c55 commit 6f9cb09

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

build_libtcod.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,8 @@ def walk_sources(directory: str) -> Iterator[str]:
156156
*build_sdl.include_dirs,
157157
]
158158

159-
extra_compile_args: list[str] = []
160-
extra_link_args: list[str] = []
161-
if "PYODIDE" in os.environ:
162-
extra_compile_args.extend(build_sdl.extra_compile_args)
163-
else:
164-
extra_compile_args.extend(build_sdl.extra_compile_args)
165-
extra_link_args.extend(build_sdl.extra_link_args)
166-
159+
extra_compile_args: list[str] = [*build_sdl.extra_compile_args]
160+
extra_link_args: list[str] = [*build_sdl.extra_link_args]
167161
sources: list[str] = []
168162

169163
libraries: list[str] = [*build_sdl.libraries]

build_sdl.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,9 @@ def get_cdef() -> tuple[str, dict[str, str]]:
350350
libraries: list[str] = []
351351
library_dirs: list[str] = []
352352

353-
354-
if sys.platform == "darwin":
353+
if "PYODIDE" in os.environ:
354+
pass
355+
elif sys.platform == "darwin":
355356
extra_link_args += ["-framework", "SDL3"]
356357
else:
357358
libraries += ["SDL3"]
@@ -382,6 +383,7 @@ def get_cdef() -> tuple[str, dict[str, str]]:
382383
extra_compile_args += (
383384
subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True).strip().split()
384385
)
385-
extra_link_args += (
386-
subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split()
387-
)
386+
if "PYODIDE" not in os.environ:
387+
extra_link_args += (
388+
subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split()
389+
)

0 commit comments

Comments
 (0)