Skip to content

Bundle PIL submodules in PyInstaller build - #500

Merged
dccote merged 1 commit into
masterfrom
fix-pyinstaller-pil-submodules
Apr 15, 2026
Merged

Bundle PIL submodules in PyInstaller build#500
dccote merged 1 commit into
masterfrom
fix-pyinstaller-pil-submodules

Conversation

@dccote

@dccote dccote commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds --collect-submodules PIL to the PyInstaller invocation so the bundled app finds PIL.ImageDraw and PIL.ImageTk. Without this, mytk loads them dynamically via importlib.import_module() and the frozen app prompts the user to "install the missing module 'ImageDraw'" on first launch.

Verified locally: rebuilt Raytracing.app, launched cleanly with no missing-module prompt.

Test plan

  • Merge → tag v1.4.2 → confirm released bundles launch without the ImageDraw prompt on macOS/Windows/Linux.

🤖 Generated with Claude Code

mytk loads PIL.ImageDraw and PIL.ImageTk via importlib.import_module(),
which PyInstaller's static analyzer can't follow. Without
--collect-submodules PIL the bundled app prompts the user to install
the missing module on first launch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dccote
dccote merged commit ff14f08 into master Apr 15, 2026
@dccote
dccote deleted the fix-pyinstaller-pil-submodules branch April 15, 2026 04:14
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