Skip to content

fix(cli): resolve Python version mismatch for bundled native extensions#46

Closed
JoeCardoso13 wants to merge 1 commit intomainfrom
fix/cli-python-version-compat
Closed

fix(cli): resolve Python version mismatch for bundled native extensions#46
JoeCardoso13 wants to merge 1 commit intomainfrom
fix/cli-python-version-compat

Conversation

@JoeCardoso13
Copy link
Collaborator

Summary

  • Detects when bundled native extensions (.so/.pyd) were built for a different CPython ABI than the user's Python
  • On mismatch, reinstalls compatible deps via uv (fallback to pip) into a versioned cache directory (.deps-cpython{tag}/)
  • No-op for pure-Python bundles or matching versions (~50ms overhead for version check on happy path)

Closes #45

Test plan

  • All 122 CLI tests pass (22 new tests for the 4 helpers + orchestrator)
  • Lint passes
  • Build passes
  • Manual: mpak run @nimblebraininc/todoist on Python 3.10 with bundle built on 3.13 — should auto-install and run

When a bundle's vendored deps contain native extensions built for a
different Python version (e.g. 3.13) than the user has (e.g. 3.10),
mpak run now detects the mismatch and reinstalls compatible deps into
a versioned cache directory using uv (with pip fallback).

Closes #45
@JoeCardoso13
Copy link
Collaborator Author

Failing manual testing.

@JoeCardoso13 JoeCardoso13 deleted the fix/cli-python-version-compat branch March 14, 2026 18:58
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.

fix(cli): Python version mismatch breaks bundled native extensions

1 participant