Hi,
I am working on deploying a python app to snap.
The problem is the app is not just some python code that can be build and that’s it.
Here’s how I run my app in the normal linux environment. I install a library from whl python file.
Then I go to write some code and ini file that tells the library where my code is.
Then I run a module from this library and pass the ini file as a configuration file.
Let’s say the whl installed library is called x, and I need to install module y, then I write the following to run my app in the normal environment:
/usr/bin/python -m x.y --configfile=custom_app.ini
I am unable to make this using snaps.
here’s my snap file structure:
name: myapp
version: '0.1'
summary:
description:
grade: devel
confinement: strict
parts:
x:
plugin: python
python-version: python2
source: /usr/local/lib/python2.7/dist-packages/x
stage-packages:
- python-dev
- python-pip
xplugins:
plugin: python
python-version: python2
source: /usr/local/lib/python2.7/dist-packages/x_plugins
stage-packages:
- libmysqlclient-dev
filesets:
appw: [/home/myname/Desktop/app-code/*]
apps:
xyz:
command: usr/bin/python -m x.y --configfile=./appw/custom.ini
daemon: simple
restart-condition: always
plugs:
- network
- network-control
- bluetooth-control
It’s not working in the current state, what is the best design for this case?
Thanks.