Skip to content
Snippets Groups Projects
Commit bedd8ea1 authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

new virtualenv build sequence

parent 9ed91cd5
No related branches found
No related tags found
No related merge requests found
......@@ -53,11 +53,24 @@ for dir in $VIRTUALENV_DIRS; do
cp -R $CACHE_DIR/$dir . &> /dev/null || true
done
# Don't rebuild existing virtualenv.
if ! [ -f "lib/python2.7" ]; then
echo "-----> Preparing virtualenv version $(virtualenv --version)"
virtualenv --distribute --never-download --prompt=venv . | indent
fi
# Create virtualenv. Rebuild if corrupt.
set +e
# Try to create the virtualenv.
OUT=$(virtualenv --distribute --never-download --prompt=venv . )
# If there's an error, purge and recreate.
[ $? -ne 0 ] && {
echo " ! Virtualenv corrupt, rebuilding."
for dir in $VIRTUALENV_DIRS; do
rm -fr $dir &> /dev/null || true
done
OUT=$(virtualenv --distribute --never-download --prompt=venv . )
}
echo "$OUT" | indent
set -e
# Create set-aside .heroku folder.
mkdir -p .heroku
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment