How can I create a snapcraft.yaml that runs a simple python file?

114 Views Asked by At

I need to create a core22 snap (snapcraft) that runs a simple python file (hello.py). I've been messing around with the snapcraft.yaml but I can't seem to get it working. If anyone has a simple template or knows more about Snapcraft, I'd really appreciate your help.

I've tried the following snapcraft.yaml but with no success:

name: hello
base: core22
version: "0.1"
summary: Hello World
description: |
  Python script that prints Hello World

grade: stable
confinement: strict

apps:
  hello:
    command: bin/hello

parts:
  hello:
    plugin: python
    source: .

Thank you so much!

0

There are 0 best solutions below