Expand description
The Python Spec Kit’s scripts run. .specify/scripts/bash/common.sh
resolves preset templates with a Python that imports PyYAML — its own
override SPECKIT_PYTHON_EXECUTABLE, else python3 — and the system
python3 usually has no PyYAML, so with a preset installed
setup-tasks.sh finds no tasks template. The installed specify runs
on a Python that has it (Spec Kit depends on PyYAML): speccoder finds
that interpreter, checks that it imports yaml, and gives it to every
command of a Spec Kit project — unless the person set the override.
Constants§
Functions§
- command_
env - The variables a command of a Spec Kit project gets: the override, set
to the installed
specify’s own interpreter when it imports PyYAML.envlooks up the command’s environment (itsPATHfindsspecify); nothing when the person set the override or its predecessor, or when no such interpreter is found. - discover
- The first interpreter of the
specifyatspecify(canonical) that imports PyYAML: its shebang’s (#!/…/python, or#!/usr/bin/env python3onpath), then the interpreters beside it (a virtual environment’sbin/, asuv toolandpipxinstall it, whose launcher may be a/bin/shtrampoline). - imports_
yaml - Whether
pythonis a Python 3 that importsyaml, ascommon.shasks it (run outside any project: ayaml.pythere is not PyYAML). - presets
- The presets installed in the project at
root(.specify/presets/<id>/). - resolver
- The Python Spec Kit’s scripts would resolve preset templates with,
given the person’s environment
env: the override when it imports PyYAML, the installedspecify’s interpreter (what speccoder passes), elsepython3onPATH.Err: none imports PyYAML — the reason. - specify_
interpreter - The interpreter of the
specifythatpathfinds, when it imports PyYAML and a sandboxed command can read it (remembered perspecifyfor the process: every command asks). - warning
- The warning for the project at
root: presets are installed and no Python Spec Kit’s scripts would use imports PyYAML (None: no preset, or one does). - warning_
before_ add - The same before a preset is installed into the project at
root.