fix(python): include generated proto stubs in Linux wheels#2029
Merged
Conversation
The generated protobuf/gRPC modules under python/openshell/_proto/ are gitignored. maturin honors .gitignore when collecting python-source files from a git checkout, so native builds (Linux release CI, local pip install .) dropped these modules and shipped an unimportable wheel. The macOS wheel only included them by accident: it builds in a Docker context whose COPY omits .git, so maturin had no gitignore to apply. Pin the stubs back in with explicit, package-relative [tool.maturin].include globs so inclusion no longer depends on whether .git is present in the build context. Add a wheel smoke check to the release-tag and release-dev workflows that installs each Linux wheel in a clean python:3.12-slim image and imports openshell.sandbox, and document the invariant in architecture/build.md. Closes #1705 Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-2029.docs.buildwithfern.com/openshell |
pimlock
approved these changes
Jun 26, 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.
Summary
The
openshellLinux wheels (0.0.54) shipped without the generated protobuf/gRPC stubs underopenshell/_proto/, so importing the package failed immediately on Linux. This pins those generated modules into the wheel and adds a wheel import smoke check to the release pipelines so the regression can't ship again.Related Issue
Closes #1705
Changes
pyproject.toml): add explicit, package-relative[tool.maturin].includeglobs for theopenshell/_proto/*_pb2.py,*_pb2_grpc.py, and*.pyistubs. These files are gitignored build outputs ofmise run python:proto; maturin honors.gitignorewhen collectingpython-sourcefiles from a git checkout, so native builds (Linux release CI, localpip install .) dropped them. The macOS wheel only included them by accident — it builds in a Docker context whoseCOPYomits.git, so maturin had no gitignore to apply. The explicitincludemakes inclusion independent of.gitpresence..github/workflows/release-tag.yml,release-dev.yml): add awheelmatrix entry (amd64 + arm64) to the existing Linux smoke jobs that installs each built wheel in a cleanpython:3.12-slimimage and importsopenshell,openshell._proto, andopenshell.sandbox.architecture/build.md): document the gitignored-stub / maturin invariant and the wheel smoke check.Testing
mise run pre-commitpasses (full lint + check + test; Rust and Python suites green —test:python58 passed,test:rust/test:sbom/test:docs-website/test:install-sh/test:packaging-assetsall pass)maturin buildinside the git repo dropped the stubs before the change and includes all 12 after; a cleanpip installof the fixed wheel importsopenshell.sandboxsuccessfullyChecklist