fix(bundle): include shell lazy imports in PyInstaller build#107
Merged
jexShain merged 4 commits intoAI-Shell-Team:mainfrom Apr 15, 2026
Merged
Conversation
Contributor
|
Thanks for the pull request. A maintainer will review it when available. Please keep the PR focused, explain the why in the description, and make sure local checks pass before requesting review. Contribution guide: https://github.com/AI-Shell-Team/aish/blob/main/CONTRIBUTING.md |
Contributor
|
This pull request description looks incomplete. Please update the missing sections below before review. Missing items:
|
…ll-lazy-imports # Conflicts: # CHANGELOG.md
jexShain
approved these changes
Apr 15, 2026
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
This PR fixes a release-blocking bundle startup regression introduced in the 0.2.1 release path.
During Release Preparation validation, the installed Linux bundle failed to start
aishafter installation with:Root Cause
aish.shellexposes shell entry points through lazy package exports insrc/aish/shell/__init__.py.The standalone binary is built with PyInstaller, but the spec only listed
aish.shellas a hidden import and did not explicitly collect the lazily importedaish.shell.*submodules.That meant the bundle could successfully build, but the installed
aishbinary failed at runtime once the CLI tried to importrun_shellthrough the lazy export path.Changes
Fixed
aish.specto collectaish.shellsubmodules withcollect_submodules('aish.shell')so lazy shell imports are bundled into the standalone binary.Validation
Automated
/home/lixin/workspace/aishell/aish/.venv/bin/python -m pytest tests/scripts/packaging/test_update_release_files.py tests/scripts/packaging/test_release_metadata.py tests/scripts/packaging/test_pyinstaller_spec.py -qmake testManual release-path verification
make build-binary./dist/aish run --model openai/gpt-4o-mini --api-key dummycan start the interactive shell in a PTY and exit cleanlymake build-bundlefar enough to install artifacts intobuild/bundle/aish-0.2.1-linux-x86_64/rootfsbuild/bundle/aish-0.2.1-linux-x86_64/rootfs/usr/bin/aish run --model openai/gpt-4o-mini --api-key dummycan also enter the interactive shell and exit cleanlyFiles
aish.spectests/scripts/packaging/test_pyinstaller_spec.pyCHANGELOG.md