Skip to content

Commit a36778f

Browse files
committed
Workaround a bug in pip which fails to install pylint in Ubuntu Trusty
We use a virtualenv where pip works fine.
1 parent d898fe5 commit a36778f

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ before_install:
2929
coreutils \
3030
python2.7 \
3131
python3-pip \
32-
python3.4 \
32+
python3.5 \
3333
shellcheck \
3434
&& \
35-
sudo pip3 install pylint; \
35+
sudo pip3 install virtualenv && \
36+
virtualenv --python=python3.5 venv-for-travis && \
37+
. ./venv-for-travis/bin/activate && \
38+
pip install pylint && \
39+
deactivate; \
3640
fi
3741
3842
script:

run-checks

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ echo "== RUNNING TESTS =="
88
echo
99

1010
echo "== RUNNING PYLINT =="
11+
readonly venv_activate=./venv-for-travis/bin/activate
12+
if [ -e "$venv_activate" ]; then
13+
echo "Using virtualenv: $venv_activate"
14+
# shellcheck disable=SC1090
15+
. "$venv_activate"
16+
else
17+
echo "No virtualenv"
18+
fi
19+
1120
./tests/run-pylint
21+
22+
if [ -e "$venv_activate" ]; then
23+
deactivate
24+
fi
1225
echo
1326

1427
echo "== RUNNING SHELLCHECK =="

0 commit comments

Comments
 (0)