mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 19:48:43 +08:00
Merge pull request #1683 from jwiggins/travis-tweaks
Fix some things on Travis
This commit is contained in:
+7
-8
@@ -8,6 +8,7 @@
|
||||
language: python
|
||||
sudo: false
|
||||
cache:
|
||||
# See http://docs.travis-ci.com/user/caching/#pip-cache
|
||||
directories:
|
||||
- $HOME/.cache/pip
|
||||
addons:
|
||||
@@ -28,14 +29,13 @@ notifications:
|
||||
on_start: false # default: false
|
||||
|
||||
python:
|
||||
- 2.6
|
||||
- 2.7
|
||||
- 3.2
|
||||
- 3.3
|
||||
- 3.4
|
||||
- 2.6
|
||||
- 2.7
|
||||
- 3.2
|
||||
- 3.3
|
||||
- 3.4
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update; true
|
||||
- source tools/travis_before_install.sh
|
||||
|
||||
- which python; python --version
|
||||
@@ -43,8 +43,7 @@ before_install:
|
||||
- tools/build_versions.py
|
||||
|
||||
install:
|
||||
- python setup.py build_ext --inplace
|
||||
- python setup.py install
|
||||
- python setup.py develop
|
||||
|
||||
script: tools/travis_script.sh
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
PySide; python_version != '2.7'
|
||||
imread; python_version != '2.7' and python_version != '3.2'
|
||||
SimpleITK; python_version != '3.2' and python_version != '3.4'
|
||||
astropy
|
||||
tifffile
|
||||
@@ -49,7 +49,8 @@ fi
|
||||
virtualenv -p python ~/venv
|
||||
source ~/venv/bin/activate
|
||||
|
||||
retry pip install -q wheel flake8 coveralls nose
|
||||
pip install --upgrade pip
|
||||
pip install --retries 3 -q wheel flake8 coveralls nose
|
||||
|
||||
# on Python 3.2, use matplotlib 1.3.1
|
||||
if [[ $TRAVIS_PYTHON_VERSION == 3.2 ]]; then
|
||||
@@ -60,10 +61,12 @@ fi
|
||||
for requirement in $WHEELBINARIES; do
|
||||
WHEELS="$WHEELS $(grep $requirement requirements.txt)"
|
||||
done
|
||||
retry pip install -q $WHEELHOUSE $WHEELS
|
||||
pip install --retries 3 -q $WHEELHOUSE $WHEELS
|
||||
|
||||
retry pip install -q -r requirements.txt
|
||||
pip install --retries 3 -q -r requirements.txt
|
||||
|
||||
# Show what's installed
|
||||
pip list
|
||||
|
||||
section () {
|
||||
echo -en "travis_fold:start:$1\r"
|
||||
|
||||
@@ -14,8 +14,9 @@ the yaml file is valid.
|
||||
set -ex
|
||||
```
|
||||
|
||||
- Use the `retry` bash function from `before_install.sh` before a command to have it try 3 times before
|
||||
failing (useful for installing from third party sources).
|
||||
- Use the `retry` bash function from `before_install.sh` before a command to
|
||||
have it try 3 times before failing.
|
||||
- Use `pip install --retries N` for retrying package downloads.
|
||||
- Use the `section` function to start a folded section of the script.
|
||||
Section names must have underscores or dots instead of spaces and must be
|
||||
accompanied by a corresponding `section_end` call.
|
||||
|
||||
+6
-17
@@ -20,6 +20,9 @@ section_end "Flake8.test"
|
||||
|
||||
section "Install.optional.dependencies"
|
||||
|
||||
# Install most of the optional packages
|
||||
pip install --retries 3 -q -r ./optional_requirements.txt $WHEELHOUSE
|
||||
|
||||
# Install Qt and then update the Matplotlib settings
|
||||
if [[ $PY == 2.7* ]]; then
|
||||
# http://stackoverflow.com/a/9716100
|
||||
@@ -37,29 +40,15 @@ if [[ $PY == 2.7* ]]; then
|
||||
done
|
||||
|
||||
else
|
||||
retry pip install -q PySide $WHEELHOUSE
|
||||
python ~/venv/bin/pyside_postinstall.py -install
|
||||
fi
|
||||
|
||||
# Install imread from wheelhouse if available (not 3.2)
|
||||
if [[ $PY != 3.2 ]]; then
|
||||
retry pip install -q $WHEELHOUSE
|
||||
fi
|
||||
|
||||
# Install SimpleITK from wheelhouse if available (not 3.2 or 3.4)
|
||||
if [[ $PY =~ 3\.[24] ]]; then
|
||||
echo "SimpleITK unavailable on $PY"
|
||||
else
|
||||
retry pip install -q SimpleITK $WHEELHOUSE
|
||||
fi
|
||||
|
||||
retry pip install -q astropy $WHEELHOUSE
|
||||
|
||||
if [[ $PY == 2.* ]]; then
|
||||
retry pip install -q pyamg
|
||||
pip install --retries 3 -q pyamg
|
||||
fi
|
||||
|
||||
retry pip install -q tifffile
|
||||
# Show what's installed
|
||||
pip list
|
||||
|
||||
section_end "Install.optional.dependencies"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user