Skip to content

fix: bundle qwen_tts source files in PyInstaller build#305

Merged
jamiepine merged 1 commit intomainfrom
fix/qwen-tts-pyinstaller-source-files
Mar 17, 2026
Merged

fix: bundle qwen_tts source files in PyInstaller build#305
jamiepine merged 1 commit intomainfrom
fix/qwen-tts-pyinstaller-source-files

Conversation

@jamiepine
Copy link
Owner

@jamiepine jamiepine commented Mar 17, 2026

Summary

  • Replace --collect-submodules + --collect-data with --collect-all for qwen_tts in build_binary.py, so physical .py source files are bundled in the frozen binary
  • qwen_tts runtime expects modeling_qwen3_tts.py as a real file under _MEIPASS (likely via inspect.getsource()), which only --collect-all provides
  • Same pattern already used for inflect (typeguard's @typechecked)

Fixes #212
Supersedes #237 — thanks to @LucianoVandi for identifying the root cause

Summary by CodeRabbit

  • Chores
    • Updated binary packaging configuration to improve how dependencies are discovered and bundled, ensuring more complete inclusion of required files during the build process.

Replace --collect-submodules + --collect-data with --collect-all for
qwen_tts. The qwen_tts runtime expects physical .py source files
(e.g. modeling_qwen3_tts.py) under _MEIPASS, which only --collect-all
provides. This is the same pattern used for inflect/typeguard.

Fixes #212
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 64c5be8f-16a1-4a17-ada2-9480d196eb42

📥 Commits

Reviewing files that changed from the base of the PR and between 0245c31 and 58b19e4.

📒 Files selected for processing (1)
  • backend/build_binary.py

📝 Walkthrough

Walkthrough

Build configuration change in backend/build_binary.py that replaces selective PyInstaller collection directives with a comprehensive --collect-all option for qwen_tts, accompanied by a comment clarifying the need to include Python source files in the bundle.

Changes

Cohort / File(s) Summary
PyInstaller Bundle Configuration
backend/build_binary.py
Replaced separate --collect-submodules and --collect-data arguments for qwen_tts with single --collect-all option; added explanatory comment about bundling .py source files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A bundler's joy, files now complete,
No missing modules on disk—sweet!
Collect-all ensures the source stays tight,
PyInstaller bundles everything right ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/qwen-tts-pyinstaller-source-files
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jamiepine jamiepine merged commit c9f38dd into main Mar 17, 2026
1 check was pending
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.

Bug: Model download fails with missing file in PyInstaller temp dir (_MEI) on macOS

1 participant