File tree 2 files changed +29
-2
lines changed
2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,13 @@ matrix:
45
45
env :
46
46
- DOC_DOC_TEST=1
47
47
before_install :
48
+ - source tools/travis_tools.sh
48
49
- virtualenv --python=python venv
49
50
- source venv/bin/activate
50
51
- python --version # just to check
51
52
- pip install -U pip # upgrade to latest pip to find 3.5 wheels
52
- - pip install nose # always
53
- - pip install --no-index -f http://travis-wheels.scikit-image.org $DEPENDS
53
+ - retry pip install nose # always
54
+ - wheelhouse_pip_install $DEPENDS
54
55
# pydicom <= 0.9.8 doesn't install on python 3
55
56
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
56
57
if [ "$PYDICOM" == "1" ]; then
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments