Skip to content

pytokens: add build-pytokens.yml for riscv64 wheels - #347

Merged
luhenry merged 1 commit into
mainfrom
pytokens
Aug 25, 2026
Merged

pytokens: add build-pytokens.yml for riscv64 wheels#347
luhenry merged 1 commit into
mainfrom
pytokens

Conversation

@luhenry

@luhenry luhenry commented Aug 25, 2026

Copy link
Copy Markdown
Member

Adds a riscv64 wheel build for pytokens 0.4.1.

pytokens is a fast, spec-compliant Python tokenizer (used by black). It publishes
mypyc-compiled per-interpreter wheels for x86_64/aarch64/macOS/Windows but nothing
for riscv64, so pip install pytokens there falls back to the pure-Python
py3-none-any wheel.

The workflow mirrors upstream's
wheels.yml
build_wheels job, narrowed to manylinux_riscv64. Upstream's [tool.cibuildwheel]
table in pyproject.toml supplies build-frontend = "build" and the MYPYC_* env,
so only the riscv64 image needs overriding. setup.py enables mypyc by default on
CPython, so no opt-in env var is needed.

Upstream does not run tests through cibuildwheel, so the test step here runs the same
pytest suite their tox envs do, preceded by an assert that pytokens.__file__ is a
.so — a compiled-wheel check, since a pure-Python fallback would still carry the
riscv64 platform tag.

Matrix is per-interpreter cp312/cp313/cp314/cp314t (mypyc wheels are not abi3).

@luhenry
luhenry marked this pull request as ready for review August 25, 2026 10:19
pytokens publishes mypyc-compiled wheels for common platforms but not
riscv64. Mirrors upstream's wheels.yml build_wheels job narrowed to
manylinux_riscv64, plus the pytest suite tox runs (upstream's
cibuildwheel run does not test its wheels).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@luhenry
luhenry merged commit cfe95c9 into main Aug 25, 2026
8 checks passed
@luhenry
luhenry deleted the pytokens branch August 25, 2026 10:42
@luhenry luhenry linked an issue Aug 25, 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.

pytokens riscv64 support

1 participant