Skip to content

ale-py: Add version 0.12.1 - #2547

Draft
luhenry wants to merge 3 commits into
mainfrom
ale-py
Draft

luhenry wants to merge 3 commits into
mainfrom
ale-py

Conversation

@luhenry

@luhenry luhenry commented Sep 30, 2026

Copy link
Copy Markdown
Member

Compiles the ALE Atari emulator core and its nanobind extension. Upstream publishes no riscv64 wheel.

Mirrors upstream's build-python.yml.

Differs from upstream

  • vcpkg image replaced: SDL2 2.30.11 and OpenCV 4.10.0 (vcpkg.json's pins) built from release tarballs.
  • XLA vector interface off - needs jaxlib, which has no riscv64 build.
  • No build isolation, so the unused jax build requirement is not resolved.
  • nanobind capped below 3, the series 0.12.1 was released with.
  • No CUDA - no riscv64 toolkit.

Matrix: cp312/cp313/cp314 - upstream skips cp314t.

Testing

  • test extra without jax/chex (jaxlib); the XLA test module skips itself.

License: Wheel bundles SDL2 (Zlib), OpenCV (Apache-2.0) and nanobind (BSD-3-Clause); upstream ships no licence text for them, so the build adds it.

Patches

  • 0001-pyproject-widen-license-files-to-cover-bundled-libraries.patch - To upstream. Without it the bundled libraries' licences are dropped. Not riscv64-specific.

Generated by Claude Code

Build ale-py (Arcade Learning Environment) riscv64 wheels for
cp312/cp313/cp314 from the upstream v0.12.1 checkout, mirroring the
build-wheels/test-wheels jobs of upstream's build-python.yml.

Upstream builds in a manylinux vcpkg image with no riscv64 variant, so
CIBW_BEFORE_ALL builds the same vcpkg.json dependencies from their
release tarballs: SDL2 2.30.11 (shared, shipped next to the extension
for SDL_DYNLOAD) and OpenCV 4.10.0 core/imgproc (static), with zlib from
the image.

The XLA vector interface is turned off: it needs jaxlib's FFI headers
and jaxlib has no riscv64 build. jax is therefore dropped from the build
by preinstalling scikit-build-core and nanobind (capped at the 2.x series
0.12.1 was released with) and building with pip --no-build-isolation.
Tests run upstream's pytest suite with the `test` extra minus jax/chex;
the XLA test module importorskips them.

A patch widens project.license-files to LICENSE* so the SDL2, OpenCV
and nanobind notices staged at the project root ship in the wheel.
luhenry added a commit that referenced this pull request Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://riseproject-dev.github.io/python-wheels/pr-preview/pr-2547/

Built to branch gh-pages at 2026-09-30 20:45 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

All three build legs failed identically at CMake configure:

  CMake Error ... OpenCVModules.cmake:131
  The imported target "libtiff" references the file
  "/usr/local/lib/opencv4/3rdparty/liblibtiff.a" but this file does
  not exist.

BUILD_LIST=core,imgproc excludes imgcodecs (the module that would
actually use libtiff/libjpeg/libpng/etc for image I/O), but OpenCV's
default WITH_TIFF=ON (and the other WITH_* format flags) still makes
it register those 3rdparty static-lib targets in the exported
OpenCVConfig/OpenCVModules cmake files -- it just never builds them,
since nothing in the core/imgproc-only build consumes them. ale-py's
own CMakeLists.txt find_package(OpenCV)'s just importing that config
is enough to hit the dangling target.

Turn the format libs off explicitly, matching what's actually needed
for core/imgproc.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
libtiff is fixed, but the rebuild hit the identical dangling-target
pattern on a different library:

  CMake Error ... OpenCVModules.cmake:96
  The imported target "libprotobuf" references the file
  "/usr/local/lib/opencv4/3rdparty/liblibprotobuf.a" but this file
  does not exist.

WITH_* defaults to ON and gets registered as a 3rdparty cmake target
regardless of BUILD_LIST -- only consumption by an actually-built
module decides whether it gets built, so any left-on default that a
core/imgproc-only build never touches leaves the same kind of dangling
reference behind. Turn off the rest of the ones that only matter to
modules this port doesn't build (dnn/objdetect/highgui/gapi/etc), not
just the image-format ones already off, so this doesn't keep coming
back one library at a time.

Signed-off-by: Ludovic Henry <git@ludovic.dev>

This branch has not been deployed

No deployments
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