Skip to content

Commit 53e0fdf

Browse files
committed
Merge pull request nipy#319 from matthew-brett/update-travis-yml
RF: make .travis.yml use travis Python and wheels We were using erlang as language and apt-get for dependencies, because of the difficulty getting numpy, scipy onto the travis slaves when using the standard travis Python virtualenvs. Now travis has numpy in the virtualenvs, and astropy, nipy.bic have wheels for the travis slaves, so installation is much quicker. This commit switches back to using the travis Python testing machinery.
2 parents 91fddff + 12f96d5 commit 53e0fdf

File tree

1 file changed

+31
-35
lines changed

1 file changed

+31
-35
lines changed

.travis.yml

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
# vim ft=yaml
2-
# travis-ci.org definition for nipy build
3-
#
4-
# We pretend to be erlang because we need can't use the python support in
5-
# travis-ci; it uses virtualenvs, they do not have numpy, scipy, matplotlib,
6-
# and it is impractical to build them
7-
language: erlang
8-
env:
9-
# Enable python 2 and python 3 builds. Python3.2 available in Ubuntu 12.04.
10-
- PYTHON=python EASY_INSTALL=easy_install PIP=pip COVERAGE=--with-coverage
11-
- PYTHON=python3 EASY_INSTALL=easy_install3 PIP=pip3.2
12-
install:
13-
- sudo apt-get update
14-
- sudo apt-get install $PYTHON-dev
15-
- sudo apt-get install $PYTHON-numpy
16-
- sudo apt-get install $PYTHON-scipy
17-
- sudo apt-get install $PYTHON-setuptools
18-
- sudo apt-get install $PYTHON-nose
19-
# Installing sympy for python3 needs pip
20-
# The following is an extended virtual line; will be made into one line by
21-
# Travis processing. Avoid `-` at the beginning of the line, remember to
22-
# add `;` at the end of continuation lines.
23-
- if [ "${PYTHON}" == "python3" ]; then
24-
sudo $EASY_INSTALL pip;
25-
sudo $PIP install sympy;
26-
else
27-
sudo apt-get install python-pip python-sympy ;
28-
fi
29-
- sudo $PIP install nibabel # Latest pypi
30-
- $PYTHON setup.py build
31-
- sudo $PYTHON setup.py install
2+
# Multiple lines can be made a single "virtual line" because of the way that
3+
# Travis munges each line before executing it to print out the exit status.
4+
# It's okay for it to be on multiple physical lines, so long as you remember:
5+
# - There can't be any leading "-"s - All newlines will be removed, so use
6+
# ";"s
7+
language: python
8+
python:
9+
- 2.6
10+
- 3.2
11+
- 3.3
12+
- 3.4
13+
matrix:
14+
include:
15+
- python: 2.7
16+
env:
17+
- COVERAGE=--with-coverage
18+
before_install:
19+
- sudo apt-get install -qq libatlas-dev libatlas-base-dev gfortran libpng-dev
20+
- pip install --no-index -f http://wheels2.astropy.org -f https://nipy.bic.berkeley.edu/scipy_installers/travis scipy matplotlib;
21+
- pip install sympy
22+
- pip install nibabel
3223
- if [ "${COVERAGE}" == "--with-coverage" ]; then
33-
sudo $PIP install coverage;
34-
sudo $PIP install coveralls;
24+
pip install coverage;
25+
pip install coveralls;
3526
fi
27+
# command to install dependencies
28+
# e.g. pip install -r requirements.txt # --use-mirrors
29+
install:
30+
- python setup.py install
31+
# command to run tests, e.g. python setup.py test
3632
script:
3733
# Change into an innocuous directory and find tests from installation
38-
- mkdir for_test
39-
- cd for_test
34+
- mkdir for_testing
35+
- cd for_testing
4036
- if [ "${COVERAGE}" == "--with-coverage" ]; then cp ../.coveragerc .; fi
41-
- $PYTHON ../tools/nipnost $COVERAGE `$PYTHON -c "import os; import nipy; print(os.path.dirname(nipy.__file__))"`
37+
- $PYTHON ../tools/nipnost $COVERAGE `python -c "import os; import nipy; print(os.path.dirname(nipy.__file__))"`
4238
after_success:
4339
- if [ "${COVERAGE}" == "--with-coverage" ]; then coveralls; fi

0 commit comments

Comments
 (0)