The change to use sys.base_prefix has caused a regression in at least one python snap (Charmcraft). The effect of this change caused core20 python snaps to now revert to using '/usr' base_prefix when looking for wheels rather than the virtual environment root, effectively $SNAP.
For example:
>>> sys.prefix
'/snap/charmcraft/x1'
>>> sys.base_prefix
'/usr'
This prevented wheels from inside the snap from being loaded. We worked around this using a snap layout in a strict snap to put the python wheels in the newly expected location. For example:
I wonder if it really should even be loading the host's wheels when inside a virtual env? With `python3 -m venv` the wheels appear to be copied into the virtual env. `virtualenv` seems to ship its own embedded variants.
The change to use sys.base_prefix has caused a regression in at least one python snap (Charmcraft). The effect of this change caused core20 python snaps to now revert to using '/usr' base_prefix when looking for wheels rather than the virtual environment root, effectively $SNAP.
For example: charmcraft/ x1'
>>> sys.prefix
'/snap/
>>> sys.base_prefix
'/usr'
This prevented wheels from inside the snap from being loaded. We worked around this using a snap layout in a strict snap to put the python wheels in the newly expected location. For example:
``` share/python- wheels: python- wheels
layout:
/usr/
bind: $SNAP/share/
```
I wonder if it really should even be loading the host's wheels when inside a virtual env? With `python3 -m venv` the wheels appear to be copied into the virtual env. `virtualenv` seems to ship its own embedded variants.