← Back to issue list

fix(snap): install python3-apt as a stage-package instead of building…

View original Github issue

Metadata

Project
charmcraft
Number
#2850
Type
pull request
State
merged
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Merged. Fixes snap build failures from uv rejecting non-compliant python-apt sources by installing python3-apt as a distro stage-package and isolating it in a dedicated snap part. Also fixes ruff lint errors.

Suggested action:

No scores available.

Issue body

… from source (#2818) * fix(snap): install python3-apt as a stage-package instead of building from source uv now rejects source distributions with non-PEP 625-compliant filenames (e.g. python-apt's .tar.xz release from Launchpad), which broke the snap build. Since the snap can't use the prebuilt python-apt wheels (they're built for a different environment), install python3-apt as a distro stage-package in the charmcraft-libs part instead, and organize its files into the charmcraft venv's site-packages. * fix(tests): resolve ruff lint failures in test suite Fix 4 ruff errors from the lint job: - PLR0917 (too many positional args) in tests/conftest.py and tests/unit/commands/test_store.py fixtures/tests, resolved by marking excess parameters as keyword-only since pytest injects fixtures by name. - ISC004 (unparenthesized implicit string concatenation in a list) in tests/unit/parts/plugins/test_charm.py and test_reactive.py, resolved by wrapping the concatenated string in parentheses. * refactor(snap): move python3-apt to its own part, matching snapcraft's approach Mirrors canonical/snapcraft#5872: split python3-apt into a dedicated nil-plugin part with a single glob organize rule, rather than stacking it onto charmcraft-libs with per-file organize entries. --------- Describe your changes. --- - [ ] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/blob/main/CONTRIBUTING.md). - [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [ ] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Fixes snap build failures from uv rejecting non-compliant python-apt sources by installing python3-apt as a distro stage-package and isolating it in a dedicated snap part. Also fixes ruff lint errors.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Fixes snap build failure by installing python3-apt as a stage-package instead of building from source. Resolves ruff lint errors and refactors snap packaging. Currently awaiting maintainer review with pending CI checks.

Update history

Date Change
updated
created

Related issues

Issue Project State Summary Similarity
#2818 fix(snap): install python3-apt as a stage-package instead of building from source charmcraft merged Merged. Fixed snap build failures from uv rejecting non-PEP 625-compliant python-apt sources by installing python3-apt as an apt stage-package instead of compiling from source. Removed requirements-noble.txt and updated snapcraft configuration.
90%
#6383 fix(snap): remove libapt-pkg-dev now that python3-apt is a stage-package snapcraft closed Merged a fix to remove redundant libapt-pkg-dev from snapcraft build dependencies, resolving uv source distribution build failures by relying on the python3-apt stage-package.
85%
#401 fix(snap): install python3-apt as a stage-package instead of building from source imagecraft closed Closed and rejected without merging. A maintainer dismissed the snap fix to stage python3-apt instead of building from source as insufficiently impactful.
84%
#6382 fix(snap): remove libapt-pkg-dev and stale comment now that python3-apt is a stage-package snapcraft closed Merged to remove the unused libapt-pkg-dev build dependency and update a stale comment, reflecting the switch to python3-apt as a stage-package.
77%