compass-core/misc/apache/compass.wsgi
zhaoxinyu a044f9f3c5 Install Compass in virtual env
Create virtualenv for compass, point compass site packages to virtualenv,
make virtualenv accessable for apache.
Change compass executable scripts to use python in env to be virtualenv
compatible.
Make progress_update daemon use virtualenv.
Comment out some health checks that use packages not available to pip, eg,
yum, apt since we have other ways to check packages any way.

Conflicts:

	conf/compassd
	install/compass.sh
	install/dependency.sh
	install/prepare.sh
	misc/apache/compass.wsgi
	requirements.txt

Change-Id: Ib48633601bf238ffc660c4694834897edbe45e07
2014-07-31 19:50:49 -07:00

21 lines
525 B
Python
Executable File

#!/usr/bin/env python
import site
import sys
import os
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