Python 3 plugin sanity checking
Barry Warsaw
barry at ubuntu.com
Fri Oct 28 22:27:23 UTC 2016
I've started to snap up GNU Mailman 3.
https://code.launchpad.net/~barry/+git/mailman-core-snap
During an earlier iteration I forgot to add usr/lib to the snap part
parts:
mailman:
plugin: python
source: https://gitlab.com/mailman/mailman.git
snap:
- bin
- lib
- usr/lib <------ this
If you install and run the resulting snap (e.g. mailman-core.mailman --version)
Python will core dump because the stdlib, and in particular the 'encodings'
module didn't get installed.
$ sudo snap install --devmode ~/projects/mailman/snap/*.snap
mailman-core 3.1b1 installed
$ mailman-core.mailman --version
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007f77264e4700 (most recent call first):
Aborted (core dumped)
Wouldn't it make sense for the Python 3 plugin to either automatically include
the stdlib (e.g. usr/lib) or complain loudly if it's not included explicitly
in the resulting snap?
Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161028/2a72fd57/attachment.sig>
More information about the Snapcraft
mailing list