Fix sys.path manipulation in pavement.py, with detailed comment

Restore reverted changes from paver part 1
This commit is contained in:
Will Daly
2014-02-14 20:04:41 -05:00
parent 9e5121f3d9
commit 544616be4b
43 changed files with 1039 additions and 537 deletions

14
pavement.py Normal file
View File

@@ -0,0 +1,14 @@
import sys
import os
# Ensure that we can import pavelib, and that our copy of pavelib
# takes precedence over anything else installed in the virtualenv.
# In local dev, we usually don't need to do this, because Python
# automatically puts the current working directory on the system path.
# In Jenkins, however, we have multiple copies of the edx-platform repo,
# each of which run "pip install -e ." (as part of requirements/edx/local.txt)
# Until we re-run pip install, the other copies of edx-platform could
# take precedence, leading to some very strange results.
sys.path.insert(1, os.path.dirname(__file__))
from pavelib import *