Конфигурация uWSGI:
<uwsgi>
<module>app_wsgi:app</module>
<pythonpath>./src</pythonpath>
<socket>/tmp/uwsgi.sock</socket>
<pidfile>/tmp/uwsgi.pid</pidfile>
<daemonize>uwsgi.log</daemonize>
</uwsgi>
buildout.cfg
[buildout]
parts = eggs uwsgi
versions = versions
include-site-packages = false
[eggs]
recipe: zc.recipe.egg:eggs
eggs =
flask
[versions]
flask = 0.9
[uwsgi]
recipe: buildout.recipe.uwsgi
version = 1.4.3
Исключение:
*** Operational MODE: single process ***
added ./src/ to pythonpath.
Traceback (most recent call last):
File "./src/app_wsgi.py", line 1, in <module>
from app import create_app
File "./src/app.py", line 1, in <module>
from flask import Flask, request
ImportError: No module named flask
unable to load app 0 (mountpoint='') (callable not found or import error)
Понятно, как исправить проблему в случае virtualenv, а вот с buildout все намного сложнее. Ручное изменение пути к python не является решением. Любые идеи?