Fix packaging for trio_core.models in built wheel#44
Draft
simonerom wants to merge 2 commits into
Draft
Conversation
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
.gitignoremodels/rule to the repository rootsrc/trio_core/modelsfrom built distributionsmodelsdirectory for large local artifactsProblem
A user-installed
trio-corepackage could passtrio doctorand still fail on first MLX inference with:In the installed package,
trio_core.modelswas missing fromsite-packages.Root Cause
The repo had this ignore rule:
models/That pattern also matched
src/trio_core/models, which is a runtime Python package. This can cause the build to excludetrio_core.modelsfrom the wheel.I confirmed the match locally with:
git check-ignore --no-index -v src/trio_core/models/__init__.py # .gitignore:32:models/ src/trio_core/models/__init__.pyFix
Change the rule to:
/models/That keeps ignoring only the top-level
modelsdirectory while allowingsrc/trio_core/modelsto be included in the package.Validation
src/trio_core/models/__init__.pymatched.gitignoremodelspath is still ignored.gitignoreUser Impact
This fixes a packaging issue where the published install can be missing runtime MLX model modules, causing inference commands like
trio analyzeto fail immediately after installation.