Skip to content

Commit 9f7f700

Browse files
committed
Add later CPython versions to fix missing pyodide wheels
Specific SDL versions needed for different Emscripten versions Ignore new SDL3 definitions
1 parent c587230 commit 9f7f700

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎.github/workflows/python-package.yml‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,26 +347,36 @@ jobs:
347347
needs: [ruff, mypy, sdist]
348348
runs-on: ubuntu-26.04
349349
timeout-minutes: 15
350+
strategy:
351+
fail-fast: false
352+
matrix:
353+
include: # https://pyodide.org/en/stable/development/abi.html
354+
- python: "cp313"
355+
sdl-version: "3.2.4" # For Emscripten 4.0.9
356+
- python: "cp314"
357+
sdl-version: "3.2.30" # For Emscripten 5.0.3
358+
- python: "cp315"
359+
sdl-version: "3.4.2" # For Emscripten 6.0.5
350360
steps:
351361
- uses: actions/checkout@v7
352362
with:
353363
persist-credentials: false
354364
fetch-depth: ${{ env.git-depth }}
355365
- name: Checkout submodules
356366
run: git submodule update --init --recursive --depth 1
357-
- uses: libsdl-org/setup-sdl@1894460666e4fe0c6603ea0cce5733f1cca56ba1
367+
- uses: libsdl-org/setup-sdl@v1.0.1
358368
with:
359369
install-linux-dependencies: true
360370
build-type: "Debug"
361-
version: "3.2.4" # Should be equal or less than the version used by Emscripten
371+
version: ${{ matrix.sdl-version }} # Should be equal or less than the version used by Emscripten
362372
- uses: pypa/cibuildwheel@v4.3.3
363373
env:
364-
CIBW_BUILD: cp313-pyodide_wasm32
374+
CIBW_BUILD: ${{ matrix.python }}-pyodide_wasm32
365375
CIBW_PLATFORM: pyodide
366376
- name: Archive wheel
367377
uses: actions/upload-artifact@v7
368378
with:
369-
name: wheels-pyodide
379+
name: wheels-pyodide-${{ matrix.python }}
370380
path: wheelhouse/*.whl
371381
retention-days: 30
372382
compression-level: 0

‎.vscode/settings.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
"DHLINE",
134134
"DISPLAYSWITCH",
135135
"distutils",
136+
"DLNOTE",
136137
"dlopen",
137138
"docstrings",
138139
"doctest",

‎build_sdl.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ def python_machine() -> str:
134134
"SDL_VIDEO_RENDER_D3D12",
135135
"SDL_SENSOR_WINDOWS",
136136
"SDL_SENSOR_DUMMY",
137+
# Added around SDL3.4
138+
"SDL_ASSERT_FILE",
139+
"SDL_DLNOTE_UNIQUE_NAME",
140+
"SDL_ELF_NOTE_DLOPEN_TYPE",
141+
"SDL_RESTRICT",
137142
)
138143
)
139144

0 commit comments

Comments
 (0)