I wrote a python package on a Debian-machine that I am trying to port over to Ubuntu Core (it comes preloaded on the hardware I want to use). On Debian, I was able to simply pull my code from git and do python3 -m mypackage "somearg"
. On Core, I would like to try to implement this as a snap since that method appears to be strongly preferred.
I figured out how to install the classic snap to get the snapcraft
build tool. I created a snap and linked my git repository. Then I installed my snap locally, but it doesn't create any binaries.
I presume this is because I didn't create any instructions to do that. I need to somewhere supply a command that says the thing to do with all this source code is to run it with a certain python command.
How do I tell me snapcraft to turn my python package into a binary that runs that package (and pass an argument)?