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/
This commit is contained in:
zhaoxinyu 2014-08-08 18:29:28 -07:00
parent 2e3bb99460
commit 63fe2e69a7
1 changed files with 3 additions and 0 deletions

View File

@ -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'