Skip to content

tree-sitter-swift: add build-tree-sitter-swift.yml for riscv64 wheels - #976

Open
luhenry wants to merge 2 commits into
mainfrom
tree-sitter-swift
Open

tree-sitter-swift: add build-tree-sitter-swift.yml for riscv64 wheels#976
luhenry wants to merge 2 commits into
mainfrom
tree-sitter-swift

Conversation

@luhenry

@luhenry luhenry commented Sep 5, 2026

Copy link
Copy Markdown
Member

Compiles the Swift tree-sitter grammar's parser and external scanner into the _binding extension. Upstream publishes no riscv64 wheel.

Mirrors upstream's package-pypi.yml, same shape as the already-merged build-tree-sitter-ruby.yml / build-tree-sitter-php.yml / build-tree-sitter-typescript.yml.

Differs from upstream

  • Release tags omit generated src/parser.c; a generate_parser job runs tree-sitter generate on x86 first (no riscv64 CLI binary).

Testing

  • same as upstream

License: OK

Built on cp312 locally (macOS venv) from the published sdist; 1 passed.

alex-pinkus/tree-sitter-swift's release tags don't commit a generated
src/parser.c (only the separate "<ver>-with-generated-files" tags do, and
those carry a stale pyproject version), so a generate_parser job runs
`tree-sitter generate` on x86 - matching upstream's own publish-pypi.yml -
before handing the completed checkout to the riscv64 cibuildwheel job.
…ndoff

cibuildwheel resolves CIBW_TEST_SOURCES relative to the invocation cwd
(the "project root"), not the package-dir argument. Extracting the
generated checkout into a tree-sitter-swift/ subdirectory and passing
that as package-dir broke this: bindings/python/tests was being looked
up at the workspace root instead of inside the subdirectory. Extract
the tarball directly into cwd (matching the other tree-sitter-* ports,
where checkout and package-dir already coincide) instead of nesting it.
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