@@ -61,15 +61,28 @@ jobs:
6161 - python : 3.7
6262 env :
6363 - EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
64+ # OSX Python support is basically accidental. Take whatever version we can
65+ # get and test with full dependencies...
66+ - os : osx
67+ language : minimal
68+ # and pre-releases. No min-requirements.txt because we can't assume a wheel that old.
69+ - os : osx
70+ language : minimal
71+ env :
72+ - EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
73+ # Test that PyPI installs from source pass
6474 - python : 3.5
6575 env :
6676 - INSTALL_TYPE=sdist
77+ # Wheels (binary distributions)
6778 - python : 3.5
6879 env :
6980 - INSTALL_TYPE=wheel
81+ # Install from git archive (e.g., https://github.com/nipy/nibabel/archive/master.zip)
7082 - python : 3.5
7183 env :
7284 - INSTALL_TYPE=archive
85+ # Run flake8... Might not be needed now we have pep8speaks
7386 - python : 3.5
7487 env :
7588 - CHECK_TYPE="style"
@@ -80,42 +93,42 @@ jobs:
8093
8194# Set up virtual environment, build package, build from depends
8295before_install :
83- - travis_retry python -m pip install --upgrade pip virtualenv
84- - virtualenv --python=python venv
96+ - travis_retry python3 -m pip install --upgrade pip virtualenv
97+ - virtualenv --python=python3 venv
8598 - source venv/bin/activate
86- - python --version # just to check
87- - travis_retry pip install -U $SETUP_REQUIRES
99+ - python3 --version # just to check
100+ - travis_retry python3 -m pip install -U $SETUP_REQUIRES
88101 - |
89102 if [ "$INSTALL_TYPE" == "sdist" ]; then
90- python setup.py egg_info # check egg_info while we're here
91- python setup.py sdist
103+ python3 setup.py egg_info # check egg_info while we're here
104+ python3 setup.py sdist
92105 export ARCHIVE=$( ls dist/*.tar.gz )
93106 elif [ "$INSTALL_TYPE" == "wheel" ]; then
94- python setup.py bdist_wheel
107+ python3 setup.py bdist_wheel
95108 export ARCHIVE=$( ls dist/*.whl )
96109 elif [ "$INSTALL_TYPE" == "archive" ]; then
97110 export ARCHIVE="package.tar.gz"
98111 git archive -o $ARCHIVE HEAD
99112 fi
100- - if [ -n "$DEPENDS" ]; then pip install $EXTRA_PIP_FLAGS $DEPENDS; fi
113+ - if [ -n "$DEPENDS" ]; then python3 -m pip install $EXTRA_PIP_FLAGS $DEPENDS; fi
101114
102115# command to install dependencies
103116install :
104117 - |
105118 if [ "$INSTALL_TYPE" == "setup" ]; then
106- python setup.py install
119+ python3 setup.py install
107120 else
108- pip install $EXTRA_PIP_FLAGS $ARCHIVE
121+ python3 -m pip install $EXTRA_PIP_FLAGS $ARCHIVE
109122 fi
110123 # Basic import check
111- - python -c 'import nibabel; print(nibabel.__version__)'
124+ - python3 -c 'import nibabel; print(nibabel.__version__)'
112125 - if [ "$CHECK_TYPE" == "skiptests" ]; then exit 0; fi
113126
114127before_script :
115128 # Point to nibabel data directory
116129 - export NIBABEL_DATA_DIR="$PWD/nibabel-data"
117130 # Because nibabel is already installed, will just look up the extra
118- - pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
131+ - python3 -m pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
119132
120133# command to run tests, e.g. python setup.py test
121134script :
@@ -155,7 +168,7 @@ script:
155168 fi
156169
157170after_script :
158- - travis_retry pip install codecov
171+ - travis_retry python3 -m pip install codecov
159172 - codecov
160173
161174notifications :
0 commit comments