feat: add Python and Poetry plugins
Metadata
Current evaluation
Merged into main via commit 8b748f3e, adding Charmcraft-specific Python and Poetry plugins with charm-oriented venv, pip, source-copy, and binary defaults.
Resolution: closed resolved
Reason: PR #1899 was approved and merged as commit 8b748f3e, introducing the Python and Poetry plugins with corresponding tests.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This adds Charmcraft-specific versions of the craft-parts `python` and `poetry` plugins. Notable differences:
- The venv is in a subdirectory
- Uses the system's `pip` so it doesn't have to install `pip` in the charm venv.
- Neither plugin tries to install the current directory as a module
- Defaults to not using binaries
- Adds the `src` and `lib` directories to the charm if they exist.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged into main via commit 8b748f3e, adding Charmcraft-specific Python and Poetry plugins with charm-oriented venv, pip, source-copy, and binary defaults. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1899 (8b748f3e), adding Charmcraft-specific Python and Poetry plugins with a subdirectory venv, system pip, dependency-only installs, binary cleanup, and src/lib copying. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1899 (commit 8b748f3e), adding Charmcraft-specific Python and Poetry plugins with adjusted venv, pip, binary, and src/lib behavior. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1899 via 8b748f3e, adding Charmcraft-specific Python and Poetry craft-parts plugins with subdirectory venvs, system pip, and automatic src/lib inclusion. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds Charmcraft-specific Python and Poetry plugins for craft-parts, adjusting venv paths, using system pip, and auto-including src/lib dirs. Changes span 24 files with 841 additions and 44 deletions, approved by two reviewers. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged maintainer lengau's changes adding Charmcraft-specific Python and Poetry plugins for craft-parts. Features include a subdirectory venv, system pip usage, disabled binary defaults, and automatic src/lib inclusion. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1873 Create charmcraft-specific versions of the upstream `python` and `poetry` plugins | charmcraft | closed | Charmcraft-specific Python and Poetry plugins were added by merged PR #1899 (commit 8b748f3e), replacing the experimental work in #1840. | |
| #1843 Add charmcraft-specific versions of upstream python plugins | charmcraft | open | Request to add charmcraft-specific python/poetry plugins. Implemented by commit 8b748f3e (PR #1899) alongside #1873; the plugins are registered as 'python'/'poetry' in get_app_plugins() and have received later fixes (#1968, #2044, #2835). | |
| #1840 [EXPERIMENTAL]: poetry plugin | charmcraft | closed | Experimental Poetry plugin PR closed unmerged in favour of charmcraft#1899, merged as commit 8b748f3e, adding charmcraft/parts/plugins/_poetry.py and _python.py with charm-oriented defaults. | |
| #18 Poetry integration | charmcraft | closed | Poetry support was ultimately delivered as Charmcraft-specific python/poetry craft-parts plugins, added in PR #1899 (commit 8b748f3e, 2023), superseding the older build.py requirements.txt idea; issue closed once shipped. | |
| #1140 Reconsider python package dependency management | charmcraft | closed | Legacy charm-plugin dependency redesign was superseded by dedicated Python and Poetry plugins, added in Charmcraft 3.3.0 by PR #1899 (8b748f3e). | |
| #2026 Change poetry plugin keep bins default to True | charmcraft | closed | Superseded by charmcraft#2036, merged as craft-parts commit 7fa20644; Python and Poetry charms now always retain a portable venv/bin/activate without Python binaries. | |
| #1077 Charms can import packages not installed in `venv` | charmcraft | closed | Charm-plugin behavior remains unchanged; Python and Poetry plugins add venv isolation, available in Charmcraft 3.3 via #1899 (8b748f3e). | |
| #1913 Document the `python` and `poetry` plugins | charmcraft | closed | Python and Poetry plugin docs were merged in #1940 (408650c8), with charm-to-Python/Poetry migration guides added in #1967 (ff00a899). | |
| #1940 feat(docs): add python and poetry plugin docs | charmcraft | merged | PR #1940 merged as commit 408650c8, adding Python and Poetry plugin documentation (+144 lines, 6 files). Builds on #1939 (craft-parts common docs) and required craft-parts#872 anchors; merged despite12 unresolved review comments. | |
| #5090 feat: add Snapcraft-specific Poetry plugin | snapcraft | merged | Merged PR #5090 at commit 5a42f0aa5, adding a Snapcraft Poetry plugin for core22/core24 and shared Python behavior; fixes #5025. |