Skip to content

Commit

Permalink
put vendored virtualenv at beginning of sys.path
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Zoschke committed Oct 31, 2011
1 parent 3de886d commit c9276ca
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bin/compile
Expand Up @@ -12,16 +12,20 @@ NAME=$($BIN_DIR/detect $BUILD_DIR)
PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads}
VIRTUALENV_DIRS="bin include lib"

virtualenv() {
VENV_PATH=$ROOT_DIR/src/virtualenv-1.6.4
PYTHONPATH=$VENV_PATH python $VENV_PATH/scripts/virtualenv "$@"
}

indent() {
RE="s/^/ /"
[ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE"
}

virtualenv() {
python - "$@" <<EOF
import sys
sys.path.insert(0, "$ROOT_DIR/src/virtualenv-1.6.4")
import virtualenv
virtualenv.main()
EOF
}

cd $BUILD_DIR

# reject a non-packaged Django app
Expand Down

0 comments on commit c9276ca

Please sign in to comment.