I think I've found the culprit.
When building with `--destructive-mode` (on focal) the content of the resulting pyvenv.cfg ends up containing:
home = /home/ack/canonical/src/crbs/parts/crbs/build/.ve/bin
include-system-site-packages = false
version = 3.8.2
whereas with a `--use-lxd` build it has
home = /root/stage/bin
include-system-site-packages = false
version = 3.8.2
Note that in the former the .ve/ dir is a virtualenv for development which gets picked up because of the part `source-type: local`.
If I remove it and build with `--destructive-mode`, the pyvenv.cfg is like this:
home = /usr/bin
include-system-site-packages = false
version = 3.8.2
Shouldn't `home` in there always point to /usr/bin as that's where python is in the base used by the snap? Even in the `--use-lxd` case which seems to always work, if there was a different python in /root/stage/bin, it could break things. Or perhaps the home setting is not needed at all, and it can be always set to nothing?
I think I've found the culprit. mode` (on focal) the content of the resulting pyvenv.cfg ends up containing:
When building with `--destructive-
home = /home/ack/ canonical/ src/crbs/ parts/crbs/ build/. ve/bin system- site-packages = false
include-
version = 3.8.2
whereas with a `--use-lxd` build it has
home = /root/stage/bin system- site-packages = false
include-
version = 3.8.2
Note that in the former the .ve/ dir is a virtualenv for development which gets picked up because of the part `source-type: local`. mode`, the pyvenv.cfg is like this:
If I remove it and build with `--destructive-
home = /usr/bin system- site-packages = false
include-
version = 3.8.2
Shouldn't `home` in there always point to /usr/bin as that's where python is in the base used by the snap? Even in the `--use-lxd` case which seems to always work, if there was a different python in /root/stage/bin, it could break things. Or perhaps the home setting is not needed at all, and it can be always set to nothing?