← Back to issue list

plugins: extract pip from python plugin

View original Github issue

Metadata

Project
snapcraft
Number
#1549
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged a refactor extracting the pip wrapper from the Python plugin. Introduces a public API to improve reusability and testability. Approved by two reviewers with passing CI checks, advancing a larger plugin extraction effort.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- At long last, making more progress on LP: [#1683036](https://bugs.launchpad.net/snapcraft/+bug/1683036) and #1444, here is the final bit of extraction necessary from the Python plugin: the Pip wrapper itself. Note that unlike the other PRs, this is a bit of a refactor. The previous pip wrapper was a very private implementation detail of the Python plugin, and didn't need much of an API. This PR introduces a bit more of an API to it in the hopes of making it a little easier to use in other plugins. It also makes it easier to test. This PR doesn't modify the Python plugin in any way just yet (that's the next PR).

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a refactor extracting the pip wrapper from the Python plugin. Introduces a public API to improve reusability and testability. Approved by two reviewers with passing CI checks, advancing a larger plugin extraction effort.
qwen3.6-35b-a3b-mtp-q6 Merged extraction of the Pip wrapper from the Python plugin into a standalone component. This refactor introduces a public API to improve testability and enable reuse across other plugins, completing a multi-step refactoring effort.
qwen3.6-35b-a3b-mtp-q6 Merged extraction of the Pip wrapper from the Python plugin into a standalone component. The refactor introduces a cleaner API for cross-plugin reuse and improved testability, completing a multi-step refactoring effort.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1607 python plugin: use extracted pip snapcraft merged Merged after fixing integration test failures from an outdated variable. The change simplifies the Python plugin by using an independently tested, extracted pip, preserving functionality while reducing code complexity.
79%
#392 plugins: fix pip path in python plugin craft-parts merged Merged a fix ensuring the python plugin uses the venv pip path, preventing unintended package installations when PATH changes. Approved by one reviewer, passed CI checks, and modified five files.
73%
#1540 plugins: extract python finder functions snapcraft merged Merged after approvals and CI. Extracts Python finder functions into a shared module as the first step in a series to refactor the python plugin and address bug LP: #1683036. Introduces no functional changes.
72%
#1547 plugins: extract sitecustomize logic from python snapcraft merged Merged a refactoring change extracting sitecustomize.py logic from the Python plugin into a shared module. Approved and passing CI, this prepares the codebase for the subsequent pip extraction without altering current functionality.
72%
#389 plugins: refactor python plugin for subclassing craft-parts merged Merged a refactor of the Python plugin to enable subclassing and method overriding for custom interpreter location logic. Approved by one reviewer, passed CI checks, and modified three files.
71%
#384 plugins: refactor python plugin for subclassing craft-parts merged 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.
70%