Skip to content

astc-encoder-py: add build-astc-encoder-py.yml for riscv64 wheels - #1776

Merged
luhenry merged 2 commits into
mainfrom
astc-encoder-py
Sep 12, 2026
Merged

luhenry merged 2 commits into
mainfrom
astc-encoder-py

Conversation

@luhenry

@luhenry luhenry commented Sep 11, 2026

Copy link
Copy Markdown
Member

Compiles a small C extension wrapping ARM's astc-encoder (vendored as a git submodule) for texture compression. Upstream publishes no riscv64 wheel.

Mirrors upstream's release.yml manylinux/musllinux jobs.

Differs from upstream

  • Pins the 0.1.12 release commit, not a tag - upstream cuts releases without git tags.
  • musllinux runs a dependency-free smoke test - registry has no riscv64 musllinux wheels for the test extras (pillow, imagehash, psutil).

Matrix: cp312/cp313/cp314 only - cp314t drops, the extension is unconditionally compiled with Py_LIMITED_API, which the free-threaded build rejects.

Testing

  • manylinux: upstream's own pytest suite via .[tests].
  • musllinux: compress/decompress round-trip smoke test.

License: OK

Built once on cp312; abi3 wheel reused and tested on cp312/cp313/cp314 via find_compatible_wheel.

Wraps ARM's astc-encoder (vendored as a git submodule) via a small C
extension. Upstream ships no git tags, so the workflow pins the
0.1.12 release commit and verifies it matches the PyPI sdist. The
extension is unconditionally built with Py_LIMITED_API, so builds
collapse to a single cp37-abi3 wheel per libc (find_compatible_wheel
reuses it for cp312/cp313/cp314) and cp314t is dropped since the
free-threaded build rejects the limited API. musllinux runs a
dependency-free smoke test since the registry has no riscv64
musllinux wheels yet for the upstream test extras.
CPython 3.14 introduced the LOAD_FAST_BORROW opcode, which skips the
incref for a local passed straight into a call; test_refcount_cleanup
asserts sys.getrefcount(astc_image) == 2 right after such a call, so
it now off-by-ones on cp314 regardless of architecture. Confirmed on
this branch's own CI: cp312 and cp313 pass the full suite, cp314
fails only this one assertion while every compress/decompress test
(including the pil codec ones) passes.
@luhenry
luhenry merged commit afe68c9 into main Sep 12, 2026
7 checks passed
@luhenry
luhenry deleted the astc-encoder-py branch September 12, 2026 19:24
@luhenry luhenry linked an issue Sep 13, 2026 that may be closed by this pull request
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.

astc-encoder-py riscv64 support

1 participant