Part of #3277 (foundation step).
Why: Everything else builds on the CLI knowing about a Python variant and being able to invoke it portably.
Tasks
- Add
"py": "Python" to SCRIPT_TYPE_CHOICES in src/specify_cli/_agent_config.py.
- Verify
process_template() (src/specify_cli/integrations/base.py) extracts py: from frontmatter via the existing generic script_type logic (should need no change — confirm).
- Update
install_scripts() to copy .py files (and handle the .sh-only chmod path appropriately).
- Add an interpreter-resolution helper (prefer project venv →
python3 → python) for the {SCRIPT} invocation string.
- Update
VALID_SCRIPT_TYPES consumers: src/specify_cli/workflows/steps/init/, src/specify_cli/integrations/_helpers.py, src/specify_cli/commands/init.py.
Acceptance
specify init x --script py selects the Python variant without error.
- Unit tests cover the new choice.
Part of #3277 (foundation step).
Why: Everything else builds on the CLI knowing about a Python variant and being able to invoke it portably.
Tasks
"py": "Python"toSCRIPT_TYPE_CHOICESinsrc/specify_cli/_agent_config.py.process_template()(src/specify_cli/integrations/base.py) extractspy:from frontmatter via the existing genericscript_typelogic (should need no change — confirm).install_scripts()to copy.pyfiles (and handle the.sh-only chmod path appropriately).python3→python) for the{SCRIPT}invocation string.VALID_SCRIPT_TYPESconsumers:src/specify_cli/workflows/steps/init/,src/specify_cli/integrations/_helpers.py,src/specify_cli/commands/init.py.Acceptance
specify init x --script pyselects the Python variant without error.