Skip to content

Commit 7db7544

Browse files
committed
TST: enable Python 3.5 tests
1 parent ea65e90 commit 7db7544

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ python:
2626
- 3.2
2727
- 3.3
2828
- 3.4
29+
- 3.5
2930
matrix:
3031
include:
3132
- python: 2.7
@@ -44,11 +45,13 @@ matrix:
4445
env:
4546
- DOC_DOC_TEST=1
4647
before_install:
48+
- source tools/travis_tools.sh
4749
- virtualenv --python=python venv
4850
- source venv/bin/activate
4951
- python --version # just to check
50-
- pip install nose # always
51-
- pip install --no-index -f http://travis-wheels.scikit-image.org $DEPENDS
52+
- pip install -U pip # upgrade to latest pip to find 3.5 wheels
53+
- retry pip install nose # always
54+
- wheelhouse_pip_install $DEPENDS
5255
# pydicom <= 0.9.8 doesn't install on python 3
5356
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
5457
if [ "$PYDICOM" == "1" ]; then

tools/travis_tools.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Tools for working with travis-ci
2+
export WHEELHOST="travis-wheels.scikit-image.org"
3+
export WHEELHOUSE="http://${WHEELHOST}/"
4+
5+
retry () {
6+
# https://gist.github.com/fungusakafungus/1026804
7+
local retry_max=5
8+
local count=$retry_max
9+
while [ $count -gt 0 ]; do
10+
"$@" && break
11+
count=$(($count - 1))
12+
sleep 1
13+
done
14+
15+
[ $count -eq 0 ] && {
16+
echo "Retry failed [$retry_max]: $@" >&2
17+
return 1
18+
}
19+
return 0
20+
}
21+
22+
23+
wheelhouse_pip_install() {
24+
# Install pip requirements via travis wheelhouse
25+
retry pip install --timeout=60 --no-index --trusted-host $WHEELHOST --find-links $WHEELHOUSE $@
26+
}

0 commit comments

Comments
 (0)