Merge juju-lint:fix-core20 into juju-lint:master

Proposed by Gabriel Cocenza
Status: Merged
Approved by: Martin Kalcok
Approved revision: d2ce33fff858276481865a43afb2fb611ecd1839
Merged at revision: d8625c2cf2cb12a09d3a2f424ef9ea01ade97770
Proposed branch: juju-lint:fix-core20
Merge into: juju-lint:master
Diff against target: 25 lines (+14/-0)
1 file modified
snap/snapcraft.yaml (+14/-0)
Reviewer Review Type Date Requested Status
Martin Kalcok (community) Approve
Eric Chen Approve
Review via email: mp+425333@code.launchpad.net

Commit message

Fix to have the snap working on bionic and jammy.

core20 need to have python libs on stage-packages in order to work
on jammy and bionic series.

Description of the change

When using core20, snapcraft reduces snap sizes by not staging anything found in the base snap, unless explicitly listed in the stage-packages. This unfortunately cause issues with python3 classic-mode. [0]

[0] https://forum.snapcraft.io/t/trouble-bundling-python-with-classic-confinement-in-core20-4-0-4/18234

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Eric Chen (eric-chen) :
Revision history for this message
Eric Chen (eric-chen) :
review: Approve
Revision history for this message
Martin Kalcok (martin-kalcok) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision d8625c2cf2cb12a09d3a2f424ef9ea01ade97770

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
2index 555e9af..69b6b71 100644
3--- a/snap/snapcraft.yaml
4+++ b/snap/snapcraft.yaml
5@@ -22,6 +22,20 @@ parts:
6 - requirements.txt
7 source: .
8 source-type: git
9+ # Classic core20 snaps require staged python.
10+ python-packages: [pip, setuptools, wheel]
11+ stage-packages:
12+ - libpython3-stdlib
13+ - libpython3.8-minimal
14+ - libpython3.8-stdlib
15+ - python3.8-minimal
16+ - python3-distutils
17+ - python3-minimal
18+ - python3-pkg-resources
19+ - python3-pip
20+ - python3-setuptools
21+ - python3-venv
22+ - python3-wheel
23 override-build: |
24 snapcraftctl build
25 echo "Version: $(python3 setup.py --version)"

Subscribers

People subscribed via source and target branches

to all changes: