Nginx + gunicorn

I’ve cobbled together an nginx plugin here, alongside a basic working use case where I can define a part specifying the nginx plugin and a nginx server conf and get the nginx bits that I want. See the working simple-nginx-snap example here.

Next, I have some basic flask + gunicorn bits here.

I’m trying to combine the flask-gunicorn part and the nginx part in a single snap to facilitate a flask app here

The issue I’m having is that when I take my nginx part and put it in a snap with my flask-gunicorn part, I get “Import Error” in the log for flask-gunicorn http://paste.ubuntu.com/25259472/, where as before when I only have the flask-gunicorn parts and not the nginx, it finds gunicorn and works just fine.

Any ideas, am I doing this right?