← Back to issue list

plugins: refactor python plugin for subclassing

View original Github issue

Metadata

Project
craft-parts
Number
#384
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #384 as commit ce664e69, making the Python plugin subclassable so applications can override interpreter-location logic.

Resolution: closed resolved

Reason: PR #384 was merged into the main branch as ce664e69. The change refactored the plugin for subclassing and method overrides needed for custom Python interpreter selection.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The location of the Python interpreter executable can depend on application-specific parameters that cannot be determined by a generic parts plugin. To address that, allow applications to subclass and override methods in the Python plugin in order to use custom logic to set the interpreter location. Co-authored-by: Tiago Nobrega <tiago.nobrega@canonical.com> Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- CRAFT-1629

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #384 as commit ce664e69, making the Python plugin subclassable so applications can override interpreter-location logic.
stealth/space-bunny-alpha — closed resolved Python plugin was refactored for subclassing and method overrides, enabling custom interpreter-location logic; merged in canonical/craft-parts#384 as ce664e69.
qwen/qwen3.6-35b-a3b — — Merged after review and CI approval. Refactored the Python plugin to enable subclassing and method overriding, allowing custom logic for determining the interpreter location. Rebased on main prior to merge.
qwen3.6-35b-a3b-mtp-q6 — — Merged a refactor of the Python plugin to enable subclassing and method overriding for custom interpreter location logic. Co-authored by Tiago Nobrega and Claudio Matsuoka. Rebased on main before integration. Resolves CRAFT-1629.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#389 plugins: refactor python plugin for subclassing craft-parts merged Merged PR #389 in commit b23e45b2, refactoring the Python plugin so applications can subclass it and override interpreter-location logic.
97%
#311 plugins: fix python shebang rockcraft merged Merged PR #311 in commit 08e6a28c, replacing hardcoded plugin Python shebangs with ${PARTS_PYTHON_INTERPRETER} so interpreter overrides are honored.
76%