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:
```
layout:
/usr/share/python-wheels:
bind: $SNAP/share/python-wheels
```
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.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1904945
Title:
New virtualenvs contain unwanted libraries
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1904945/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs