Skip to content

Fix packaging for trio_core.models in built wheel#44

Draft
simonerom wants to merge 2 commits into
mainfrom
fix/models-package-wheel
Draft

Fix packaging for trio_core.models in built wheel#44
simonerom wants to merge 2 commits into
mainfrom
fix/models-package-wheel

Conversation

@simonerom

Copy link
Copy Markdown

Summary

  • anchor the .gitignore models/ rule to the repository root
  • stop excluding src/trio_core/models from built distributions
  • preserve ignoring a top-level models directory for large local artifacts

Problem

A user-installed trio-core package could pass trio doctor and still fail on first MLX inference with:

Missing dependency: No module named 'trio_core.models'

In the installed package, trio_core.models was missing from site-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 exclude trio_core.models from 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__.py

Fix

Change the rule to:

/models/

That keeps ignoring only the top-level models directory while allowing src/trio_core/models to be included in the package.

Validation

  • confirmed before the change that src/trio_core/models/__init__.py matched .gitignore
  • confirmed after the change that it no longer matches
  • confirmed a top-level models path is still ignored
  • verified the diff is limited to .gitignore

User Impact

This fixes a packaging issue where the published install can be missing runtime MLX model modules, causing inference commands like trio analyze to fail immediately after installation.

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