Skip to content

Commit bc88b14

Browse files
committed
Preemptively fix Travis CI failure spotted elsewhere*
* xolox/python-humanfriendly@51241d1
1 parent 1320e76 commit bc88b14

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/install-on-travis.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
if [ "$TRAVIS_OS_NAME" = osx ]; then
77
VIRTUAL_ENV="$HOME/virtualenv/python2.7"
88
if [ ! -x "$VIRTUAL_ENV/bin/python" ]; then
9+
if ! which virtualenv &>/dev/null; then
10+
# Install `virtualenv' in ~/.local (doesn't require `sudo' privileges).
11+
pip install --user virtualenv
12+
# Make sure ~/.local/bin is in the $PATH.
13+
LOCAL_BINARIES=$(python -c 'import os, site; print(os.path.join(site.USER_BASE, "bin"))')
14+
export PATH="$PATH:$LOCAL_BINARIES"
15+
fi
916
virtualenv "$VIRTUAL_ENV"
1017
fi
1118
source "$VIRTUAL_ENV/bin/activate"

0 commit comments

Comments
 (0)