compass-core/misc/apache/compass.wsgi
zhaoxinyu 63fe2e69a7 Make packages in virtualenv take precedance.
Duplicate installations of packages in system python environment
will take precedance by default and make unforseeable issues, so
we declare to use packages in virutalenv first and then system packages.

Change-Id: I29a56ffad33dfabec3ea73a84dbdc8e943ca8153
Closes-bug: #1354625
Cherry-pick from review.openstack.org/#/c/113052/
2014-08-20 17:09:51 -07:00

24 lines
629 B
Python
Executable File

#!/usr/bin/env python
import site
import sys
import os
activate_this='$PythonHome/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
site.addsitedir('$PythonHome/lib/python2.6/site-packages')
sys.path.append('$PythonHome')
os.environ['PYTHON_EGG_CACHE'] = '/tmp/.egg'
from compass.api import app as application
from compass.utils import flags
from compass.utils import logsetting
from compass.utils import setting_wrapper as setting
flags.init()
flags.OPTIONS.logfile = setting.WEB_LOGFILE
logsetting.init()
from compass.api import api as compass_api
compass_api.init()
application = compass_api.app