← Back to issue list

plugins: better checking for needed payload python

View original Github issue

Metadata

Project
craft-parts
Number
#449
Type
pull request
State
merged
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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: ![image](https://github.com/canonical/craft-parts/assets/1951299/1f0199d0-3c11-48a0-917b-d8f4560982d5) 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
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 issues

Issue Project State Summary Similarity
#222 plugins: add rockcraft specific python plugin rockcraft merged Merged a rockcraft-specific Python plugin supporting bare and ubuntu bases. Approved by two reviewers, the update modifies 26 files and closes issue #194.
76%
#4497 chore(deps): make python-apt requirement match rockcraft snapcraft closed Merged to align python-apt dependency with rockcraft, resolving pyinstaller freeze issues. Approved by reviewer, passed CI checks, and closed after fixing the dependency mismatch.
71%