Snapcraft a prebuilt python app (no setup.py file)

Hi,

I’m working on snapping Timeline, a python app which provide a “prebuilt” zip without any setup.py file :

http://thetimelineproj.sourceforge.net/installing.html#installing-from-source

For now, i’m using the trick described in the post Add external resources into final snap : download the zip of the app, extract it to my snap folder and copy these files with dump plugin.

Here is my working snapcraft.yaml : https://gist.github.com/brunob/1155589f66171992c8661dd8a51d8555

If you take a look at the file revisions, you will see i’ve tried many ways to get the app directly from the app repo without using the dump plugin, no success.

Anybody could advice me on a way to handle this case ? Any advice on my snap fil would be helpful too, since it’s my first shot on snapcraft :slight_smile:

1 Like

Playing with override-build to copy the source files of the app to /var/opt/timeline seems to work, see the latest revision of my snapcraft file : https://gist.github.com/brunob/1155589f66171992c8661dd8a51d8555

Maybe it would be better to do it with dump plugin, not sure…

1 Like

That’s how I’d do it as well, I think you found the right path. Using the dump plugin wouldn’t get python into the snap, so it would probably end up being more work.

1 Like