Thanks for the suggestions. I went for this which works, but looks inelegant to me. Any suggestions for improvements?
name: offlineimap
version: 'master'
summary: OfflineIMAP
description: |
Read/sync your IMAP mailboxes
grade: stable
confinement: strict
apps:
offlineimap:
command: bin/offlineimap
plugs:
- network
parts:
setup:
plugin: python
python-version: python2
python-packages: [six]
offlineimap:
after: [setup]
plugin: python
python-version: python2
source: https://github.com/OfflineIMAP/offlineimap.git
build-packages:
- gcc
- g++