forked from astropy/astropy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (70 loc) · 4.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
language: python
#Note that this .trais.yml uses a second file to manage installation of dependencies
#and their locations - ".travis.pip.wheel". Look there to manage the wheels.
python:
- 2.6
- 2.7
- 3.2
- 3.3
# This is just for "egg_info". All other builds are explicitly given in the matrix
env:
- SETUP_CMD='egg_info' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
# OPTIONAL_DEPS most importantly means scipy
matrix:
include:
# Check for sphinx doc build warnings - we do this first because it runs for a long time
- python: 2.7
env: SETUP_CMD='build_sphinx -w -n' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=true
# OPTIONAL_DEPS needed because the plot_directive in sphinx needs them
# try all python versions with the latest numpy
- python: 2.6
env: SETUP_CMD='test --parallel=8' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
- python: 2.7
env: SETUP_CMD='test --parallel=8' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
# There is a bug in pytest-xdist that prevents it from working
# on Python 3.x. See
# https://bitbucket.org/hpk42/pytest/issue/301/internal-error-during-test-collecting
- python: 3.2
env: SETUP_CMD='test' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
- python: 3.3
env: SETUP_CMD='test' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=false
# now try do scipy on 2.7 and an appropriate 3.x build (with latest numpy)
- python: 2.7
env: SETUP_CMD='test --parallel=8' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=true LC_CTYPE=C.ascii
- python: 3.2
env: SETUP_CMD='test' NUMPY_VERSION=1.7.1 OPTIONAL_DEPS=true LC_CTYPE=C.ascii
# try alternate numpy versions
- python: 2.7
env: NUMPY_VERSION=1.6.2 SETUP_CMD='test --parallel=8' OPTIONAL_DEPS=false
- python: 3.2
env: NUMPY_VERSION=1.6.2 SETUP_CMD='test --parallel=8' OPTIONAL_DEPS=false
- python: 2.7
env: NUMPY_VERSION=1.5.1 SETUP_CMD='test --parallel=8' OPTIONAL_DEPS=false
before_install:
# use utf8 encoding. Should be default, but this is insurance against future changes
- export PYTHONIOENCODING=UTF8
# install the pip that supports wheel
# this particular commit is "known good". Whenever pip 1.4 is released, we should switch to that
- pip install -e git+https://github.com/pypa/pip@be0c47f7aae5bc840dc1ec6af9fcbb2ae7ec2354#egg=pip
- pip install wheel
# We do this to make sure we get dependencies so pip works below
# Note that travis does *not* use python packages installed via apt - it does all the building in an isolated virtualenv
- sudo apt-get update -qq
- if [[ $SETUP_CMD != egg_info ]]; then sudo apt-get install -qq python-numpy cython libatlas-dev liblapack-dev gfortran; fi
- if $OPTIONAL_DEPS; then sudo apt-get install -qq python-scipy libhdf5-serial-1.8.4 libhdf5-serial-dev; fi
- if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get install -qq python-sphinx graphviz texlive-latex-extra dvipng python-matplotlib; fi
install:
# these command run pip first trying a wheel, and then falling back on source build
# see .travis.pip.wheel for details on how to map from package to wheel URL
- if [[ $SETUP_CMD != egg_info ]]; then bash .travis.pip.wheel $TRAVIS_PYTHON_VERSION numpy $NUMPY_VERSION -q; fi
- if [[ $SETUP_CMD != egg_info ]]; then bash .travis.pip.wheel $TRAVIS_PYTHON_VERSION Cython 0.18 -q; fi
- if [[ $SETUP_CMD != egg_info ]]; then pip -q install pytest-xdist --use-mirrors; fi
- if $OPTIONAL_DEPS; then bash .travis.pip.wheel $TRAVIS_PYTHON_VERSION scipy 0.12.0; fi
# not doing -q in scipy because if we have to fall back on the source build it takes too long and travis times out without continuous output
- if $OPTIONAL_DEPS; then bash .travis.pip.wheel $TRAVIS_PYTHON_VERSION h5py 2.1.3 -q; fi
# build_sphinx needs sphinx and matplotlib (for plot_directive)
- if [[ $SETUP_CMD == build_sphinx* ]]; then bash .travis.pip.wheel $TRAVIS_PYTHON_VERSION Sphinx 1.1.3 -q -p; fi
- if [[ $SETUP_CMD == build_sphinx* ]]; then bash .travis.pip.wheel $TRAVIS_PYTHON_VERSION matplotlib 1.2.1 -q; fi
# this matplotlib will *not* work with py 3.x, but our sphinx build is currently 2.7, so that's fine
script:
- python setup.py $SETUP_CMD