Conversation
Adds a riscv64 wheel build for pynini, wrapping the OpenFst/OpenGrm finite-state transducer libraries for grammar compilation. Upstream publishes no riscv64 wheel and carries no CI of its own; the workflow mirrors third_party/Dockerfile, the manylinux recipe it documents for its own PyPI wheels: build OpenFst 1.8.4 with --enable-grm, then build and auditwheel-repair the pynini wheel against it.
luhenry
added a commit
that referenced
this pull request
Sep 28, 2026
Contributor
|
Upstream's tests/BUILD.bazel declares one py_test target per *_test.py
file; absltest.main() parses sys.argv into absl FLAGS via app.run() before
any test runs, which is how FLAGS.test_tmpdir/test_srcdir end up usable in
setUpClass/self.create_tempfile(). Collecting the suite into one
`python -m pytest tests/` never parses those flags, so every absltest-based
class touching them raised UnparsedFlagAccessError (chatspeak_test,
export_test, grm_test::testFilledExporter, multi_grm_test::testFilledExporter,
stringfile_test::test_roundtrip).
pynini_test.py's StringFileTest failed separately (FstIOError: Read failed):
it holds a workspace-root-relative path (`tests/testdata/str.map`) that only
resolves correctly when cwd is the project root, not one level into tests/
as the previous `cd {project}/tests` did.
Run each tests/*_test.py as its own `python <file>` subprocess from
{project} instead, mirroring Bazel's one-process-per-target model (see
gotcha 439/611); this fixes both failure modes at once and drops the now-
unused `pytest` from CIBW_TEST_REQUIRES.
luhenry
marked this pull request as ready for review
September 28, 2026 22:52
luhenry
added a commit
that referenced
this pull request
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pynini2.1.7Compiles Cython bindings over OpenFst/OpenGrm for weighted finite-state grammar compilation. Upstream publishes no riscv64 wheel.
Mirrors upstream's own manylinux recipe,
third_party/Dockerfile.Differs from upstream
CIBW_BEFORE_ALL_LINUXinstead of a separate Docker stage - same./configure --enable-grmrecipe, adapted to cibuildwheel.Testing
tests/*_test.pyexceptchatspeak_model_test.py, which needs an external model file.License: Wheel bundles OpenFst's shared libraries (Apache-2.0); upstream ships no licence text for it, so the build adds one.
Patches
0001-ship-OpenFst-s-licence-in-the-wheel-s-dist-info.patch- To upstream (no fork to push from). Without it the wheel's dist-info carries no OpenFst license text alongside pynini's own; reproduces off riscv64 too (verified against the real PyPI x86_64 wheel).Built on cp312; pending CI.