|
1 | 1 | # 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 |
32 | 23 | - if [ "${COVERAGE}" == "--with-coverage" ]; then
|
33 |
| - sudo $PIP install coverage; |
34 |
| - sudo $PIP install coveralls; |
| 24 | + pip install coverage; |
| 25 | + pip install coveralls; |
35 | 26 | 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 |
36 | 32 | script:
|
37 | 33 | # 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 |
40 | 36 | - 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__))"` |
42 | 38 | after_success:
|
43 | 39 | - if [ "${COVERAGE}" == "--with-coverage" ]; then coveralls; fi
|
0 commit comments