Skip to content

Commit b037526

Browse files
committed
NF - python 3 building for travis-ci
After some futzing, work round virtualenvs to build and test nibabel under Travis CI. Needed to do `python setup.py install` for numpy, and find 2to3 refactored tests in installation directory.
1 parent b5e8d71 commit b037526

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.travis.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@ language: python
33
python:
44
- "2.6"
55
- "2.7"
6+
- "3.2"
7+
env:
8+
NUMPY_VER=1.6.1
9+
before_install:
10+
- mkdir builds
11+
- pushd builds
12+
- curl -O http://pypi.python.org/packages/source/n/numpy/numpy-${NUMPY_VER}.tar.gz
13+
- tar zxf numpy-${NUMPY_VER}.tar.gz
14+
- cd numpy-${NUMPY_VER}
15+
- python setup.py install
16+
- popd
617
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
718
install:
8-
- pip install numpy --use-mirrors
19+
- python setup.py install
920
# command to run tests, e.g. python setup.py test
1021
script:
11-
- nosetests nibabel
22+
# Change into an innocuous directory and find tests from installation
23+
- cd doc
24+
- nosetests `python -c "import os; import nibabel; print(os.path.dirname(nibabel.__file__))"`

0 commit comments

Comments
 (0)