Skip to content

Commit ca1dfb2

Browse files
committed
BF: fix travis builds with new travis setup
Travis now has numpy installed in their python 2 virtualenvs, and it looks like our own numpy builds were failing as a result. Don't build numpy for python 2 and use virtualenv numpy instead.
1 parent 4ef5573 commit ca1dfb2

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

.travis.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
# vim ft=yaml
2+
# Multiple lines can be made a single "virtual line" because of how Travis
3+
# munges each line before executing it to print out the exit status. It's okay
4+
# for it to be on multiple physical lines, so long as you remember: - There
5+
# can't be any leading "-"s - All newlines will be removed, so use ";"s
26
language: python
37
python:
4-
- "2.5"
58
- "2.6"
69
- "2.7"
710
- "3.2"
811
env:
9-
NUMPY_VER=1.6.1
12+
NUMPY_VER=1.7.0
1013
before_install:
11-
- mkdir builds
12-
- pushd builds
13-
- curl -O http://pypi.python.org/packages/source/n/numpy/numpy-${NUMPY_VER}.tar.gz
14-
- tar zxf numpy-${NUMPY_VER}.tar.gz
15-
- cd numpy-${NUMPY_VER}
16-
- python setup.py install
17-
- popd
14+
# Travis virtualenvs have numpy for Python 2
15+
- if [[ "${TRAVIS_PYTHON_VERSION:0:1}" > "2" ]]; then
16+
mkdir builds;
17+
pushd builds;
18+
curl -O http://pypi.python.org/packages/source/n/numpy/numpy-${NUMPY_VER}.tar.gz;
19+
tar zxf numpy-${NUMPY_VER}.tar.gz;
20+
cd numpy-${NUMPY_VER};
21+
python setup.py install;
22+
popd;
23+
fi
24+
# pydicom <= 0.9.8 doesn't install on python 3
25+
- if [[ "${TRAVIS_PYTHON_VERSION:0:1}" < "3" ]]; then
26+
easy_install -U pydicom;
27+
fi
1828
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
1929
install:
20-
# This has to be on a single "virtual line" because of how Travis
21-
# munges each line before executing it to print out the exit status.
22-
# It's okay for it to be on multiple physical lines, so long as you remember:
23-
# - There can't be any leading "-"s
24-
# - All newlines will be removed, so use ";"s
25-
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" \< "3" ]; then
26-
easy_install -U pydicom;
27-
fi
2830
- python setup.py install
2931
# command to run tests, e.g. python setup.py test
3032
script:
3133
# Change into an innocuous directory and find tests from installation
3234
- mkdir for_testing
3335
- cd for_testing
34-
- nosetests `python -c "import os; import nibabel; print(os.path.dirname(nibabel.__file__))"`
36+
- nosetests --with-doctest `python -c "import os; import nibabel; print(os.path.dirname(nibabel.__file__))"`

0 commit comments

Comments
 (0)