I’ve a simple yaml to build a python2 application, but it always fails to build with the “ImportError: No module named six” error. The project has a requirements.txt which specifies six, but I have also tried specifying it with python-packages and stage-packages in the yaml, but it always fails the same way. Any ideas?
It looks like the error here is in the pull stage of snapcraft. When snapcraft runs setup.py it ends up wanting to import six (via an import of offlineimap). You’ll want to ensure you have six setup in the Python environment that snapcraft uses to build offlineimap part.
If you want the snapcraft.yaml to be in the same project as the source code, even the separate part to install setup deps will find the setup.py and try to install it.
Sorry for the delay. Looks like we need to update the python example. Note that the genuine offlineimap snap is built slightly differently and fixes the ‘six’ issue.