← Back to issue list

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

View original Github issue

Metadata

Project
imagecraft
Number
#401
Type
pull request
State
closed
Author
Copilot
Labels
—
Created
Updated
Closed

Current evaluation

Closed unmerged. Copilot's port of charmcraft#2818 (python3-apt as a stage-package instead of a rejected .tar.xz source build) was dismissed by @lengau as "not enough of a change to bother"; no code landed in imagecraft.

Resolution: closed stale

Reason: The PR received no reviews and was closed without merge after @lengau's sole comment (2026-08-12) that the change was not worth making; no commit references the proposed python3-apt part, so the underlying problem of uv rejecting PEP 625 sdists for python-apt remains unaddressed in imagecraft.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Replicates [canonical/charmcraft#2818](https://github.com/canonical/charmcraft/pull/2818) for imagecraft. `uv` now hard-rejects sdists with non-PEP 625 filenames (`.tar.xz`), which is the only format Launchpad serves for `python-apt`. ## Changes - **New `python3-apt` part** — stages the distro package and organizes `usr/lib/python3/dist-packages/*` into `lib/python3.12/site-packages/`, providing the `apt`/`apt_pkg`/`apt_inst`/`aptsources` bindings without a source build. - **`imagecraft-libs`** — removed `python3-apt` from `stage-packages` and dropped the old `apt*` organize entry, both now handled by the dedicated part. - **`imagecraft` part** — added `python3-apt` to `after`; removed `libapt-pkg-dev` from top-level `build-packages` (only needed when compiling python-apt from source).

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed unmerged. Copilot's port of charmcraft#2818 (python3-apt as a stage-package instead of a rejected .tar.xz source build) was dismissed by @lengau as "not enough of a change to bother"; no code landed in imagecraft.
stealth/space-bunny-alpha — closed stale Closed unmerged after a maintainer said it was “not enough of a change to bother”; the proposed python3-apt stage-package approach was not accepted.
qwen/qwen3.6-35b-a3b — — Closed and rejected without merging. A maintainer dismissed the snap fix to stage python3-apt instead of building from source as insufficiently impactful.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 85
needs review Switches snap build to install python3-apt as a stage-package instead of building from source, resolving uv's rejection of non-PEP 625 sdists. Currently pending maintainer review with passing CI.

Update history

Date Change
closed
created

Related work

  • Related To: canonical/charmcraft#2818 (confidence 95%)

    The upstream PR this one explicitly replicated; it was merged in charmcraft, establishing the same approach that was declined here.

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 PR canonical/charmcraft#2818 by lengau: snap build no longer builds python-apt from source via uv; python3-apt added to charmcraft-libs stage-packages and organized into the venv site-packages. Removed requirements-noble.txt and libapt-pkg-dev.
82%
#2850 fix(snap): install python3-apt as a stage-package instead of building… charmcraft merged Merged PR #2850 as commit e6edb4c6, replacing the incompatible python-apt source build with a dedicated python3-apt stage-package for snap builds.
75%
#6382 fix(snap): remove libapt-pkg-dev and stale comment now that python3-apt is a stage-package snapcraft closed Merged canonical/snapcraft#6382, removing obsolete libapt-pkg-dev from snap build dependencies and correcting the stale python-apt source-build comment.
74%
#3236 snap: use python3-apt stage-package snapcraft closed PR #3236 was closed unmerged after years with review pending and no CI or comments; the proposed switch from pip to the python3-apt stage package was not applied.
73%
#6383 fix(snap): remove libapt-pkg-dev now that python3-apt is a stage-package snapcraft closed PR #6383 was merged, dropping the redundant libapt-pkg-dev build-package from snap/snapcraft.yaml now that python3-apt is installed via stage-packages, and refreshing the stale MAKEOPTS comment.
72%