plugins: better checking for needed payload python
Metadata
Current evaluation
Merged PR #449 as 1fbda451, deferring Python venv symlink removal until build end so payload-interpreter checks can run and unusable ROCKs are prevented.
Resolution: closed resolved
Reason: The change was merged as commit 1fbda451, removing venv symlinks after validating a required part-provided Python interpreter. It addressed CRAFT-1725 and was verified with a Rockcraft spread test.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This commit handles the case where the venv symlinks must be removed, but a part-provided Python interpreter *must* be present. This is done by deferring the symlink removal to the end of the build, so that the existing check for a valid interpreter can be performed.
This is to address the "Rockcraft/ubuntu" case in the following table of existing scenarios:

That case is particularly bad because the "failure to have the build fail" results in a ROCK that is completely unusable, because of an additional (usrmerge) bug that will be addressed in a separate PR/issue.
CRAFT-1725
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #449 as 1fbda451, deferring Python venv symlink removal until build end so payload-interpreter checks can run and unusable ROCKs are prevented. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #449 as 1fbda451: deferred Python-venv symlink removal until build end, preserving interpreter checks and preventing unusable Rockcraft/Ubuntu ROCKs. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Defers venv symlink removal to the end of the build to verify the required Python interpreter is present. Fixes a critical failure generating unusable ROCKs in Rockcraft/ubuntu. Approved and rebased to resolve pyright. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged after rebasing to fix a pyright lint issue. Deferring venv symlink removal until after the build ensures the required Python interpreter remains available. This prevents unusable ROCKs in Rockcraft/ubuntu scenarios and resolves CRAFT-1725. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/rockcraft#257
(confidence 95%)
Added the spread test used to verify the Rockcraft scenario.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #487 plugins: be more specific in search for payload Python | craft-parts | merged | Merged PR #487 as commit d3cc6ccf, requiring the payload Python version to exactly match the venv and avoiding ambiguous binaries such as python3.6m. |