I’m writing a small snap using the python plugin and I’m struggling with the apps command section.
Right now I have the following:
apps:
governor-broker:
command: bin/python3 bin/broker
daemon: simple
Where broker is a entry point that I created with setup.py:
setup(
name="governor-broker",
version="0.1",
packages=["src"],
entry_points={
"console_scripts": [
"broker=src.broker:main"]
},
)
When I try to install this snap I get the following error:
File "/snap/governor-broker/x1/bin/broker", line 5, in <module>
from src.broker import main
ModuleNotFoundError: No module named 'src'
going directly to the /snap directory of my snap I was able to execute this correctly by using the python3 binary located in the bin folder.
But when I state the following in my snapcraft.yaml:
apps:
governor-broker:
command: bin/python3 bin/broker
daemon: simple
I get the follwoing error when building the snap:
Failed to generate snap metadata: The specified command 'bin/python3 bin/broker defined in the app 'governor-broker' is not executable.
What am I doing wrong here?