Skip to content

semantic-text-splitter: add build-semantic-text-splitter.yml for riscv64 wheels - #1520

Merged
luhenry merged 5 commits into
mainfrom
semantic-text-splitter
Sep 8, 2026
Merged

semantic-text-splitter: add build-semantic-text-splitter.yml for riscv64 wheels#1520
luhenry merged 5 commits into
mainfrom
semantic-text-splitter

Conversation

@luhenry

@luhenry luhenry commented Sep 8, 2026

Copy link
Copy Markdown
Member

Compiles benbrandt/text-splitter's Rust text-chunking library into the semantic-text-splitter PyO3 extension module. Upstream publishes no riscv64 wheel.

Mirrors upstream's python.yml linux job.

Differs from upstream

  • cibuildwheel replaces PyO3/maturin-action - this repo's standard riscv64 build path
  • LICENSE.txt staged into bindings/python/ before build - maturin globs licences relative to pyproject.toml's directory and upstream ships none there
  • abi3t/cp315 build dropped - targets an unreleased CPython, outside this repo's floor

Matrix: cp310-abi3 (pyo3's abi3-py310 floor) + cp314t; no musllinux (rustup ships no riscv64 musl toolchain)

Testing

  • same as upstream (pytest, tokenizers, tree-sitter-python)

License: OK

…v64 wheels

Adds a riscv64 wheel build for semantic-text-splitter 0.32.0, a PyO3/maturin
binding over the text-splitter crate. bindings/python/Cargo.toml's abi3
feature (pyo3/abi3-py310) is on by default, so one abi3 wheel serves
cp310-cp314 and a separate build covers the free-threaded cp314t wheel that
pyo3 produces automatically under Py_GIL_DISABLED.
maturin ships this project as a mixed-source package (semantic_text_splitter/
with an __init__.py wrapping the abi3 extension submodule), so the top-level
module's __file__ ends in __init__.py, not .so. Check the wheel's RECORD via
importlib.metadata.files() for a .so entry instead of the module's own
__file__, matching what the abi3 build actually produced on riscv64 CI.
public PyPI ships no riscv64 wheel for tree-sitter-python 0.25.0, so pip
built it from the sdist; that from-source build is missing the external
scanner's symbols (ImportError: undefined symbol:
tree_sitter_python_external_scanner_create). pypi.riseproject.dev already
carries a correctly-built riscv64 wheel from this repo's own
tree-sitter-python port, so route pip there via PIP_EXTRA_INDEX_URL.
test_hugging_face_from_file/test_markdown_hugging_face_from_file load a
fixture via the relative path "tests/bert-base-cased.json", which only
resolves from bindings/python (upstream's own CI sets that as the working
directory). CIBW_TEST_SOURCES stages the full bindings/python/tests path
under the test cwd, so invoking pytest from the staging root instead of
bindings/python left those two tests unable to find the fixture file.
tree-sitter-python ships no cp314t wheel anywhere upstream (only
cp310-abi3), and its PyPI sdist is missing src/scanner.c -- present in its
own git tag, so this is a universal packaging gap, not riscv64-specific.
Building it from sdist on the cp314t leg produces a real .so that dlopen
rejects with "undefined symbol: tree_sitter_python_external_scanner_create".
test_integration.py imports tree_sitter_python at module scope, so the whole
suite is uncollectable on this interpreter regardless. Drop it from
CIBW_TEST_REQUIRES on cp314t and skip pytest there; the compiled-extension
and licence assertion (unaffected, checked before pytest runs) still proves
the wheel itself is real.
@luhenry
luhenry merged commit 96ad709 into main Sep 8, 2026
7 checks passed
@luhenry
luhenry deleted the semantic-text-splitter branch September 8, 2026 14:41
@luhenry luhenry linked an issue Sep 8, 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.

semantic-text-splitter riscv64 support

1 participant