user virtualenv in update.py

This commit is contained in:
j 2013-03-02 05:27:52 +00:00
parent 4711d2be9c
commit 05bd43e878
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,14 @@
#!/usr/bin/python
import os
root_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
os.chdir(root_dir)
#using virtualenv's activate_this.py to reorder sys.path
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
if os.path.exists(activate_this):
execfile(activate_this, dict(__file__=activate_this))
import sys
import subprocess
from os.path import join, exists