Skip to content

Commit

Permalink
Merge 687fc74 into d31366b
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Aug 27, 2015
2 parents d31366b + 687fc74 commit c4024a1
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 15 deletions.
38 changes: 29 additions & 9 deletions .travis.yml
Expand Up @@ -4,21 +4,38 @@
# It's okay for it to be on multiple physical lines, so long as you remember:
# - There can't be any leading "-"s - All newlines will be removed, so use
# ";"s
sudo: false # To use travis container infrastructure
language: python
cache:
directories:
- $HOME/.cache/pip
env:
global:
- DEPENDS="numpy scipy sympy matplotlib nibabel"
python:
- 2.6
- 3.2
- 3.3
- 3.4

matrix:
include:
- python: 2.7
env:
- COVERAGE=--with-coverage
- COVERAGE=1
# Absolute minimum dependencies
- python: 2.7
env:
- DEPENDS="numpy==1.6.0 scipy==0.7.0 sympy==0.7.0 nibabel==1.2.0"
before_install:
- sudo apt-get install -qq libatlas-dev libatlas-base-dev gfortran libpng-dev
- pip install --no-index -f http://wheels2.astropy.org -f https://nipy.bic.berkeley.edu/scipy_installers/travis scipy matplotlib;
- pip install sympy
- pip install nibabel
- if [ "${COVERAGE}" == "--with-coverage" ]; then
- source tools/travis_tools.sh
- virtualenv --python=python venv
- source venv/bin/activate
- python --version # just to check
- retry pip install nose # always
- wheelhouse_pip_install $DEPENDS
# - sudo apt-get install -qq libatlas-dev libatlas-base-dev gfortran libpng-dev
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
fi
Expand All @@ -31,7 +48,10 @@ script:
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- if [ "${COVERAGE}" == "--with-coverage" ]; then cp ../.coveragerc .; fi
- $PYTHON ../tools/nipnost $COVERAGE `python -c "import os; import nipy; print(os.path.dirname(nipy.__file__))"`
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package dipy";
fi
- $PYTHON ../tools/nipnost $COVER_ARGS nipy
after_success:
- if [ "${COVERAGE}" == "--with-coverage" ]; then coveralls; fi
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi
13 changes: 7 additions & 6 deletions nipy/info.py
Expand Up @@ -93,10 +93,10 @@
To run NIPY, you will need:
* python_ >= 2.5 (tested with 2.5, 2.6, 2.7, 3.2, 3.3)
* numpy_ >= 1.2
* python_ >= 2.6 (tested with 2.6, 2.7, 3.2, 3.3, 3.4)
* numpy_ >= 1.6.0
* scipy_ >= 0.7.0
* sympy_ >= 0.6.6
* sympy_ >= 0.7.0
* nibabel_ >= 1.2
You will probably also like to have:
Expand Down Expand Up @@ -138,12 +138,13 @@
MICRO = _version_micro
ISRELEASE = _version_extra == ''
VERSION = __version__
REQUIRES = ["numpy", "scipy", "sympy"]
REQUIRES = ["numpy", "scipy", "sympy", "nibabel"]
STATUS = 'beta'

# versions
NUMPY_MIN_VERSION='1.2'
SCIPY_MIN_VERSION = '0.7'
# Update in readme text above
NUMPY_MIN_VERSION='1.6.0'
SCIPY_MIN_VERSION = '0.7.0'
NIBABEL_MIN_VERSION = '1.2'
SYMPY_MIN_VERSION = '0.7.0'
MAYAVI_MIN_VERSION = '3.0'
Expand Down
25 changes: 25 additions & 0 deletions tools/travis_tools.sh
@@ -0,0 +1,25 @@
# Tools for working with travis-ci
export WHEELHOUSE="http://travis-wheels.scikit-image.org/"

retry () {
# https://gist.github.com/fungusakafungus/1026804
local retry_max=5
local count=$retry_max
while [ $count -gt 0 ]; do
"$@" && break
count=$(($count - 1))
sleep 1
done

[ $count -eq 0 ] && {
echo "Retry failed [$retry_max]: $@" >&2
return 1
}
return 0
}


wheelhouse_pip_install() {
# Install pip requirements via travis wheelhouse
retry pip install --timeout=60 --no-index --find-links $WHEELHOUSE $@
}

0 comments on commit c4024a1

Please sign in to comment.