← Back to issue list

error out if core24 classic python snap is created with the non-staged python binary

View original Github issue

Metadata

Project
snapcraft
Number
#5144
Type
issue
State
open
Author
dariuszd21
Labels
Created
2024-11-14 21:56:26+00:00
Updated
2024-11-14 22:04:08+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done Add logic to the `post_prime` of the python plugin to error out if classic snap is created using system python (`/usr/bin/python*`) https://github.com/canonical/snapcraft/blob/main/snapcraft/parts/plugins/python_common.py#L67 ### Why it needs to get done If core24 classic python snap stages `python3.12-minimal`, but no `python3-minimal` (symlink to the python binary), virtualenv is created incorrectly (using build host python) and `pyvenv.cfg` ends up with incorrect entry `home = /usr/bin`. That makes this snap unusable on the host with the different Ubuntu version that the given core It also breaks re-building `core24` classic python snaps

Evaluation history

No evaluation history available.