Skip to content

Add py script type & interpreter resolution #3278

Description

@mnriem

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 → python3python) 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions