← Back to issue list

charmcraft pack wont produce a proper charm

View original Github issue

Metadata

Project
charmcraft
Number
#2494
Type
issue
State
open
Author
erik78se
Labels
Created
2025-11-30 09:27:02+00:00
Updated
2025-12-08 21:29:16+00:00
Closed

Current evaluation

charmcraft init templates fail to properly bundle pyproject.toml dependencies via the uv plugin and default to Ubuntu 22.04, with a PR opened to improve documentation and maintainers acknowledging the base OS version needs updating.

Suggested action: keep open

Reason: Maintainers have actively engaged, acknowledged the documentation and template gaps, opened PR #2506 to address them, and confirmed the base version oversight. The issue is valid, triaged, and has clear maintainer buy-in, making it appropriate to keep open for tracking the template updates.

Staleness: 40 Complexity: 10 Confidence: 90 Support Request: 0

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description **When:** Creating a default machine charm with charmcraft init. ``` mkdir foobar charmcraft init --profile machine vi pyproject.toml # modify the dependencies charmcraft pack unzip -l foobar_amd64.charm # The dependencies has not been included as expected ``` **Expected 1:** A charm that builds a machine charm and respects the dependencies in pyproject.toml for added python libs. **Expected 2:** The charm builds for 24.04 since this would be something reasonable. **What I did:** I added a library to the pyproject.toml dependencies. **What happened:** The built charm was built for a 22.04 (very old) **What happened:** The built charm ignored the pyproject.toml What I would like to see: The charmcraft init --profile machine should behave properly and respect the pyproject.toml (and be 24.04) ### Steps to reproduce ``` mkdir foobar charmcraft init --profile machine vi pyproject.toml # modify the dependencies charmcraft pack unzip -l foobar_amd64.charm # The dependencies has not been included as expected ``` ### Environment charmcraft 4.0.1 ### charmcraft.yaml ```yaml type: charm name: foobar title: Charm Template summary: A very short one-line summary of the charm. description: | test base: ubuntu@22.04 platforms: amd64: parts: charm: plugin: uv source: . build-snaps: - astral-uv ``` ### Log output ```shell ```

Evaluation history

Date Model Scores Action Summary
2026-06-15 13:32:00.232447+00:00 qwen3.6-35b-a3b-mtp-q6
Staleness: 40
Complexity: 10
Confidence: 90
Support Request: 0
keep open charmcraft init templates fail to properly bundle pyproject.toml dependencies via the uv plugin and default to Ubuntu 22.04, with a PR opened to improve documentation and maintainers acknowledging the base OS version needs updating.
2026-06-15 13:27:52.012023+00:00 pending