Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the virtualenv if it has not been created with proper python #54

Merged
merged 1 commit into from
Jul 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions virtualenvsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def buildCommand(self):

# first, set up the virtualenv if it hasn't already been done, or if it's
# broken (as sometimes happens when a slave's Python is updated)
if ! test -f "$VE/bin/pip" || ! "$VE/bin/python" -c 'import math'; then
if ! test -f "$VE/bin/pip" || ! test -d "$VE/lib/$PYTHON" || ! "$VE/bin/python" -c 'import math'; then
wget {VIRTUALENV_URL}
unzip {VIRTUALENV_FILENAME}
echo "Setting up virtualenv $VE";
rm -rf "$VE";
test -d "$VE" && {{ echo "$VE couldn't be removed"; exit 1; }};
$PYTHON virtualenv.py "$VE" || exit 1;
$PYTHON virtualenv.py -p $PYTHON "$VE" || exit 1;
else
echo "Virtualenv already exists"
fi
Expand Down