Skip to content

pygame-ce: Add version 2.5.8 - #1819

Merged
luhenry merged 1 commit into
mainfrom
pygame-ce
Sep 21, 2026
Merged

luhenry merged 1 commit into
mainfrom
pygame-ce

Conversation

@luhenry

@luhenry luhenry commented Sep 12, 2026

Copy link
Copy Markdown
Member

Compiles pygame-ce's SDL2-based C/Cython extensions via its meson-python build. Upstream publishes no riscv64 wheel.

Mirrors upstream's build-manylinux.yml.

Differs from upstream

  • Builds SDL2/SDL2_image/SDL2_ttf/SDL2_mixer/portmidi from source, not upstream's docker_base image - no riscv64 SDL2-devel exists (Rocky 10 dropped it for sdl2-compat)
  • Drops SDL2_mixer's MOD (libxmp/modplug) and fluidsynth-MIDI backends - EPEL-only, and EPEL is empty on riscv64 - plus opus file decoding, which needs libopusfile that no Rocky 10 package provides, and wavpack with them so the set is coherent
  • Drops harfbuzz text shaping in SDL_ttf: Rocky 10 does ship a riscv64 harfbuzz-devel, but its libharfbuzz links libglib-2.0 and libgraphite2, which auditwheel would vendor and whose copyleft sources the gpl_sources job would then have to carry - the same trim build-pygame.yml made
  • Sets PG_DEPS_FROM_SYSTEM=1 - upstream's own marker for a build linked against system SDL dependencies rather than its curated set, which its test suite uses to skip what such a build cannot satisfy (upstream sets it in build-ubuntu-sdist.yml, run-ubuntu-checks.yml, dev-check.yml and build-sdl3.yml)
  • python -u on the test command - pygame's runner prints a module's results only once that module finishes, so buffered stdout hides which module stalls

Matrix: cp312/cp313/cp314. numpy, the test dependency, ships riscv64 wheels for those interpreters only; pp311 is dropped for lack of riscv64 PyPy, and free-threaded builds are skipped upstream too.

Testing

  • same as upstream: python -m pygame.tests -v --exclude opengl,music,timing --time_out 300, which runs 2385 tests on each interpreter

License: Wheel bundles SDL2/SDL2_image/SDL2_ttf/SDL2_mixer/portmidi and several Rocky 10 system libraries (mpg123 and jbigkit are GPL); upstream ships no licence text for any of them, so the build adds it and archives the GPL sources.

Patches

  • 0001-tests-skip-the-arc-rasteriser-tests-on-riscv64.patch - pygame.draw.arc() is unreliable on riscv64: test_arc__correct_drawing never returns and test_arc__surface_clip segfaults, both inside the C rasteriser on a bare draw_arc() call. Because pygame's runner defaults to single-process mode its --time_out never applies, so the hang took whole jobs down and the segfault took the module's buffered output with it. Running draw_test under python -X faulthandler -m unittest, then each of its 252 tests in its own interpreter, leaves exactly these two failing and everything else green. riscv64-only: the same command runs 2385 tests in 18s against upstream's own x86_64 2.5.8 wheel (same SDL 2.32.10).
  • 0002-tests-extend-PG_DEPS_FROM_SYSTEM-to-opus-MOD-and-HarfBuzz.patch - extends the PG_DEPS_FROM_SYSTEM marker upstream already honours to three cases it misses: the house_lo.opus and surfonasinewave.xm entries in test_load_object/test_object_namehint, which sit unguarded next to an already-guarded house_lo.wv, and test_font_set_script/test_font_set_direction, which need SDL_ttf built with HarfBuzz. Not architecture-specific - the same four tests fail for anyone building against a system SDL_mixer/SDL_ttf without those optional backends.

luhenry added a commit that referenced this pull request Sep 12, 2026
@luhenry
luhenry force-pushed the pygame-ce branch 4 times, most recently from 83f37a1 to 6dec89e Compare September 13, 2026 04:35
@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-21 07:36 UTC

@luhenry
luhenry marked this pull request as draft September 21, 2026 00:36
@luhenry luhenry changed the title pygame-ce: add build-pygame-ce.yml for riscv64 wheels pygame-ce: Add version 2.5.8 Sep 21, 2026
@luhenry
luhenry force-pushed the pygame-ce branch 2 times, most recently from 56f783d to 3b29a17 Compare September 21, 2026 02:00
Builds SDL2, SDL2_image, SDL2_ttf, SDL2_mixer and portmidi from source at the
versions upstream's own manylinux docker_base image uses (Rocky 10 ships no
SDL2-devel and EPEL is empty on riscv64), then runs cibuildwheel over the
pygame-ce checkout. The mod, fluidsynth-midi, wavpack and opusfile mixer
backends and SDL_ttf's harfbuzz shaping are dropped: their dependencies are
EPEL-only or have no riscv64 devel package.

The matrix stops at cp312-cp314 because numpy, pygame-ce's test dependency,
ships riscv64 wheels for those interpreters only; pp311 is dropped for lack of
riscv64 PyPy and the free-threaded builds are skipped upstream as well.

One patch skips test_arc__correct_drawing: pygame.draw.arc() never returns on
riscv64 for some of the rect/angle/width combinations it sweeps, hanging the
whole suite rather than failing. The rest of draw_test runs as upstream runs it.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
@luhenry
luhenry marked this pull request as ready for review September 21, 2026 03:01
luhenry added a commit that referenced this pull request Sep 21, 2026
…h of cp312-cp314

Two real defects fixed by patches, both hidden by pygame's own test runner:
pygame.draw.arc() hangs and segfaults on riscv64 (skipped, localised to two
tests out of draw_test's 252), and four tests that need SDL backends this
build omits now honour upstream's own PG_DEPS_FROM_SYSTEM marker. The 8-day
run of "cancelled" jobs was the workflow's own timeout-minutes: 600, not
runner eviction. Left ready for review, not merged.
@luhenry
luhenry merged commit 72ebaf3 into main Sep 21, 2026
12 checks passed
@luhenry
luhenry deleted the pygame-ce branch September 21, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant