()
| 21 | } |
| 22 | |
| 23 | func (c custom) CheckTools() []string { |
| 24 | // Start with build_tools from port.toml |
| 25 | tools := slices.Clone(c.BuildConfig.BuildTools) |
| 26 | |
| 27 | // Add default tools |
| 28 | tools = append(tools, "cmake") |
| 29 | |
| 30 | // Auto-detect Python usage from custom commands to ensure the venv is set up. |
| 31 | if c.needsPython() && !slices.Contains(tools, "python3") { |
| 32 | tools = append(tools, "python3") |
| 33 | } |
| 34 | return tools |
| 35 | } |
| 36 | |
| 37 | // needsPython checks if any custom command references Python placeholders. |
| 38 | func (c custom) needsPython() bool { |
nothing calls this directly
no test coverage detected