mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 20:22:51 +08:00
Merge pull request #1938 from stefanv/test_against_numpy_pre-releases
BUILD: Use --pre flag for Travis pip installs.
This commit is contained in:
+12
-6
@@ -35,12 +35,18 @@ notifications:
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: false # default: false
|
||||
|
||||
python:
|
||||
- 2.6
|
||||
- 2.7
|
||||
- 3.3
|
||||
- 3.4
|
||||
- 3.5
|
||||
matrix:
|
||||
include:
|
||||
- python: 2.6
|
||||
env: WITH_PYAMG=1 NO_SPHINX=1
|
||||
- python: 2.7
|
||||
env: PIP_FLAGS="--pre"
|
||||
- python: 2.7
|
||||
env: WITH_PYAMG=1 MINIMUM_REQUIREMENTS=1 WITH_QT=1
|
||||
- python: 3.4
|
||||
env: OPTIONAL_DEPS=1 WITH_PYSIDE=1
|
||||
- python: 3.5
|
||||
env: PIP_FLAGS="--pre"
|
||||
|
||||
before_install:
|
||||
- ccache -s
|
||||
|
||||
@@ -39,8 +39,7 @@ if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then
|
||||
sed -i 's/matplotlib.*/matplotlib==1.4.3/g' requirements.txt
|
||||
fi
|
||||
|
||||
# test minimum requirements on 2.7
|
||||
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
|
||||
if [[ $MINIMUM_REQUIREMENTS == 1 ]]; then
|
||||
sed -i 's/>=/==/g' requirements.txt
|
||||
fi
|
||||
|
||||
@@ -55,9 +54,9 @@ pip install --retries 3 -q wheel flake8 coveralls nose
|
||||
for requirement in $WHEELBINARIES; do
|
||||
WHEELS="$WHEELS $(grep $requirement requirements.txt)"
|
||||
done
|
||||
pip install --retries 3 -q $WHEELHOUSE $WHEELS
|
||||
pip install --retries 3 -q $PIP_FLAGS $WHEELHOUSE $WHEELS
|
||||
|
||||
pip install --retries 3 -q -r requirements.txt
|
||||
pip install --retries 3 -q $PIP_FLAGS -r requirements.txt
|
||||
|
||||
# Show what's installed
|
||||
pip list
|
||||
|
||||
+13
-11
@@ -8,7 +8,7 @@ nosetests $TEST_ARGS skimage
|
||||
section_end "Test.with.min.requirements"
|
||||
|
||||
section "Build.docs"
|
||||
if [[ ($PY != 2.6) && ($PY != 3.2) ]]; then
|
||||
if [[ $NO_SPHINX != 1 ]]; then
|
||||
export SPHINXCACHE=$HOME/.cache/sphinx; make html
|
||||
fi
|
||||
section_end "Build.docs"
|
||||
@@ -21,12 +21,12 @@ section_end "Flake8.test"
|
||||
section "Install.optional.dependencies"
|
||||
|
||||
# Install most of the optional packages
|
||||
if [[ $PY != 3.2* ]]; then
|
||||
if [[ $OPTIONAL_DEPS == 1 ]]; then
|
||||
pip install --retries 3 -q -r ./optional_requirements.txt $WHEELHOUSE
|
||||
fi
|
||||
|
||||
# Install Qt and then update the Matplotlib settings
|
||||
if [[ $PY == 2.7* ]]; then
|
||||
if [[ $WITH_QT == 1 ]]; then
|
||||
# http://stackoverflow.com/a/9716100
|
||||
LIBS=( PyQt4 sip.so )
|
||||
|
||||
@@ -41,11 +41,11 @@ if [[ $PY == 2.7* ]]; then
|
||||
ln -sf $LIB_SYSTEM_PATH/$LIB $LIB_VIRTUALENV_PATH/$LIB
|
||||
done
|
||||
|
||||
elif [[ $PY != 3.2* ]]; then
|
||||
elif [[ $WITH_PYSIDE == 1 ]]; then
|
||||
python ~/venv/bin/pyside_postinstall.py -install
|
||||
fi
|
||||
|
||||
if [[ $PY == 2.* ]]; then
|
||||
if [[ $WITH_PYAMG == 1 ]]; then
|
||||
pip install --retries 3 -q pyamg
|
||||
fi
|
||||
|
||||
@@ -58,7 +58,7 @@ section_end "Install.optional.dependencies"
|
||||
section "Run.doc.examples"
|
||||
|
||||
# Matplotlib settings - do not show figures during doc examples
|
||||
if [[ $PY == 2.7* ]]; then
|
||||
if [[ $MINIMUM_REQUIREMENTS == 1 ]]; then
|
||||
MPL_DIR=$HOME/.matplotlib
|
||||
else
|
||||
MPL_DIR=$HOME/.config/matplotlib
|
||||
@@ -89,15 +89,17 @@ for f in doc/examples/xx_applications/*.py; do
|
||||
done
|
||||
|
||||
# Now configure Matplotlib to use Qt4
|
||||
if [[ $PY == 2.7* ]]; then
|
||||
if [[ $WITH_QT == 1 ]]; then
|
||||
MPL_QT_API=PyQt4
|
||||
export QT_API=pyqt
|
||||
else
|
||||
elif [[ $WITH_PYSIDE == 1 ]]; then
|
||||
MPL_QT_API=PySide
|
||||
export QT_API=pyside
|
||||
fi
|
||||
echo 'backend: Qt4Agg' > $MPL_DIR/matplotlibrc
|
||||
echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc
|
||||
if [ "$WITH_QT" = "1" -o "$WITH_PYSIDE" = "1" ]; then
|
||||
echo 'backend: Qt4Agg' > $MPL_DIR/matplotlibrc
|
||||
echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc
|
||||
fi
|
||||
|
||||
section_end "Run.doc.applications"
|
||||
|
||||
@@ -105,7 +107,7 @@ section_end "Run.doc.applications"
|
||||
section "Test.with.optional.dependencies"
|
||||
|
||||
# run tests again with optional dependencies to get more coverage
|
||||
if [[ $PY == 3.3 ]]; then
|
||||
if [ $OPTIONAL_DEPS == 1 ]; then
|
||||
TEST_ARGS="$TEST_ARGS --with-cov --cover-package skimage"
|
||||
fi
|
||||
nosetests $TEST_ARGS
|
||||
|
||||
Reference in New Issue
Block a user