From 63fe2e69a729bedcd5cadfdfab0be6b32fafa6f8 Mon Sep 17 00:00:00 2001 From: zhaoxinyu Date: Fri, 8 Aug 2014 18:29:28 -0700 Subject: [PATCH] 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/ --- misc/apache/compass.wsgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/apache/compass.wsgi b/misc/apache/compass.wsgi index fdb8d9bb..a707dd87 100755 --- a/misc/apache/compass.wsgi +++ b/misc/apache/compass.wsgi @@ -2,6 +2,9 @@ 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'