fix: bundle scripts/python in wheel so --script py works (#3665)#3668
Merged
Merged
Conversation
The wheel force-include mapped scripts/bash and scripts/powershell into core_pack but omitted scripts/python. As a result, `specify init --script py` laid down commands referencing .specify/scripts/python/*.py while installing bash scripts, breaking every command at its first setup step. Add the scripts/python force-include mapping to mirror the other script variants so the core Python scripts ship in the packaged wheel. Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1bc9c590-2c0c-4d88-bf3c-23f265cef82d
Contributor
There was a problem hiding this comment.
Pull request overview
Bundles core Python workflow scripts in wheel distributions so --script py works correctly.
Changes:
- Adds the missing
scripts/pythonwheel inclusion mapping. - Aligns Python packaging with Bash and PowerShell variants.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Includes Python scripts under core_pack/scripts/python. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Medium
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
Fixes #3665.
specify init --script pyproduced commands/skills referencing.specify/scripts/python/*.py, but those files were never installed —initlaid down the bash scripts instead, so every command failed at its first setup step.Root cause
The wheel
[tool.hatch.build.targets.wheel.force-include]block inpyproject.tomlmappedscripts/bashandscripts/powershellintocore_pack, but omittedscripts/python. The top-level core Python scripts (check_prerequisites.py,common.py,create_new_feature.py,setup_plan.py,setup_tasks.py) were therefore missing from the packaged wheel, even though the extension python scripts were bundled.Fix
Add the missing
scripts/python→specify_cli/core_pack/scripts/pythonforce-include mapping, mirroring the other script variants. No runtime code change was needed —install_shared_infrainshared_infra.pyalready resolves thepythonvariant dir for--script py.Verification
Built the wheel locally and confirmed the scripts now ship:
This PR was authored autonomously by GitHub Copilot (model: Claude Opus 4.8) on behalf of @mnriem.