Skip to content

nle: Add version 1.3.0 - #3374

Merged
github-actions[bot] merged 2 commits into
mainfrom
nle
Oct 25, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
nle

Conversation

@luhenry

@luhenry luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

The NetHack Learning Environment: a pybind11/CMake C++ extension over the
NetHack game engine. Upstream publishes no riscv64 wheel (manylinux x86_64/
aarch64 only, cp310-cp313).

Mirrors upstream's own test_and_deploy.yml build_wheels job (cibuildwheel,
config in pyproject.toml's [tool.cibuildwheel]).

Differs from upstream

  • CIBW_BEFORE_ALL uses dnf instead of yum - our manylinux image is Rocky
    10-based, upstream's manylinux2014 is CentOS 7-based.
  • Adds a PATCH_COMMAND to the deboost_context FetchContent_Declare in
    CMakeLists.txt (see Patches) - the vendored dependency already ships
    riscv64 fcontext assembly but its own CMake arch dispatch never selects it.

Matrix: cp310-cp313 only - upstream's own [tool.cibuildwheel] build list
stops at cp313; no cp314/cp314t wheels on any platform either.

Testing

  • same as upstream's test_manylinux_3_13 job (pytest over nle/tests,
    staged via CIBW_TEST_SOURCES to avoid the nle/ import-shadowing the test
    directory sits under)

License: OK

Patches

  • 0001-cmakelists-riscv64-fcontext-dispatch.patch - To upstream. Without it,
    septag/deboost.context (fetched via FetchContent, pinned by this
    project) silently builds its x86_64 fcontext assembly on riscv64 instead of
    the riscv64 files it already ships but never dispatches to.

Not built locally: no CMake/C++ toolchain in this sandbox.

NetHack Learning Environment: pybind11/CMake extension over the NetHack
game engine (NGPL-licensed), no riscv64 wheel on PyPI (manylinux x86_64/
aarch64 only, cp310-cp313). Mirrors upstream's own cibuildwheel job from
.github/workflows/test_and_deploy.yml, narrowed to riscv64 (dnf instead
of yum for the manylinux2014-vs-Rocky-10 package manager difference).

Patches the FetchContent-fetched septag/deboost.context dependency
(pinned by nle's own CMakeLists.txt) to add the riscv64 branch its own
CMake arch dispatch is missing: it already ships riscv64 fcontext
assembly (asm/*_riscv64_sysv_elf_gas.S) but never selects it, silently
falling through to the x86_64 files instead.
luhenry added a commit that referenced this pull request Oct 15, 2026
@luhenry
luhenry marked this pull request as draft October 16, 2026 00:04
The inline `sed` PATCH_COMMAND added for deboost.context never ran: with
nle's cmake_minimum_required(3.28) FetchContent populates through a
generated sub-build project, and re-serializing the command into it
expanded ${CMAKE_SYSTEM_PROCESSOR}, stripped the quotes and the `\/`
escapes, so every build failed at configure time with
"sed: -e expression #1, char 19: unknown option to `s'".

Do the edit from a small `cmake -P` script added by the patch instead;
only its path has to survive the sub-build round trip. The script is
idempotent and a no-op if deboost.context gains its own riscv64 branch.

Also set SETUPTOOLS_SCM_PRETEND_VERSION: applying the patch leaves the
tagged checkout dirty, so setuptools_scm would otherwise version the
wheel 1.3.1.dev0+g<sha>.d<date> (the failing runs already reported
"Building nle backend version: 1.3.1").

And fix the test step the build never reached: numpy and psutil only
resolve to riscv64 wheels from pypi.riseproject.dev, and
test_profile.py needs the pytest-benchmark fixture even though it skips
its benchmarks when CI=true (upstream tests against nle[all]).
@github-actions
github-actions Bot marked this pull request as ready for review October 25, 2026 00:16
@github-actions
github-actions Bot merged commit e136c5d into main Oct 25, 2026
9 checks passed
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