Skip to content

fix: bundle scripts/python in wheel so --script py works (#3665)#3668

Merged
mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-fix-3665-bundle-python-scripts
Jul 22, 2026
Merged

fix: bundle scripts/python in wheel so --script py works (#3665)#3668
mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-fix-3665-bundle-python-scripts

Conversation

@mnriem

@mnriem mnriem commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3665. specify init --script py produced commands/skills referencing .specify/scripts/python/*.py, but those files were never installed — init laid 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 in pyproject.toml mapped scripts/bash and scripts/powershell into core_pack, but omitted scripts/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/pythonspecify_cli/core_pack/scripts/python force-include mapping, mirroring the other script variants. No runtime code change was needed — install_shared_infra in shared_infra.py already resolves the python variant dir for --script py.

Verification

Built the wheel locally and confirmed the scripts now ship:

$ unzip -Z1 dist/specify_cli-*.whl | grep 'core_pack/scripts/python/'
specify_cli/core_pack/scripts/python/check_prerequisites.py
specify_cli/core_pack/scripts/python/common.py
specify_cli/core_pack/scripts/python/create_new_feature.py
specify_cli/core_pack/scripts/python/setup_plan.py
specify_cli/core_pack/scripts/python/setup_tasks.py

This PR was authored autonomously by GitHub Copilot (model: Claude Opus 4.8) on behalf of @mnriem.

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
Copilot AI review requested due to automatic review settings July 22, 2026 19:15
@mnriem mnriem self-assigned this Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bundles core Python workflow scripts in wheel distributions so --script py works correctly.

Changes:

  • Adds the missing scripts/python wheel 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

@mnriem
mnriem merged commit 93fc533 into github:main Jul 22, 2026
14 checks passed
@mnriem
mnriem deleted the mnriem-fix-3665-bundle-python-scripts branch July 22, 2026 19:22
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]: --script py is broken — core scripts/python/*.py missing from the packaged wheel (core_pack)

2 participants