|
4 | 4 | global:
|
5 | 5 | - NUMPY=numpy
|
6 | 6 | - MPL=matplotlib
|
| 7 | + - PYPROJ=pyproj |
7 | 8 | - TEST_ARGS=--no-pep8
|
| 9 | + - BUILD_LIBGEOS=false |
| 10 | + |
| 11 | +# install apt binary packages |
| 12 | +addons: |
| 13 | + apt: |
| 14 | + packages: |
| 15 | + - libgeos-3.3.8 |
| 16 | + # matplotlib requirements |
| 17 | + - libpng12-dev |
| 18 | + - libfreetype6-dev |
| 19 | + # helpers utilities |
| 20 | + - autotools-dev |
| 21 | + - wget |
8 | 22 |
|
9 | 23 | language: python
|
10 | 24 |
|
| 25 | +cache: pip |
| 26 | + |
| 27 | + |
| 28 | +# matrix generates 6 test cases |
11 | 29 | matrix:
|
12 | 30 | include:
|
| 31 | + # "minimum requirements" environments |
| 32 | + # test the bare minimum versions |
| 33 | + # compiles internal libgeos |
| 34 | + # Notes: |
| 35 | + # numpy 1.7.0 is the first version that works out of the box for Python 2.6 and 3.3 |
| 36 | + # numpy 1.5.1 is the earliest version to compile and *might* be able to work on Python 2.6, |
| 37 | + # if two unit tests are skipped due to numpy.copy(a,order) not having 'order' parameter |
| 38 | + # 1.6.0-1.6.2 works out of the box for Python 2.6 |
| 39 | + # matplotlib 1.2.0 was found to be the earliest version that installs |
13 | 40 | - python: 2.6
|
14 |
| - env: NUMPY=numpy==1.6 |
15 |
| - - python: 2.7 |
| 41 | + env: |
| 42 | + - NUMPY=numpy==1.7.0 |
| 43 | + - MPL=matplotlib==1.2.0 |
| 44 | + - BUILD_LIBGEOS=internal |
16 | 45 | - python: 3.3
|
| 46 | + env: |
| 47 | + - NUMPY=numpy==1.7.0 |
| 48 | + - MPL=matplotlib==1.2.0 |
| 49 | + - BUILD_LIBGEOS=internal |
| 50 | + |
| 51 | + # "middle of the road" environment |
| 52 | + # use prepackaged binaries |
| 53 | + # if no prepackaged binary available, use a previous stable version |
17 | 54 | - python: 3.4
|
| 55 | + env: |
| 56 | + - MPL=matplotlib==1.4.3 |
| 57 | +# - NUMPY="numpy>=1.9.0,<1.10.0" # use the default install of numpy |
| 58 | + |
| 59 | + # "latest and greatest" stable environments |
| 60 | + # this uses the current stable versions |
| 61 | + # pip installs latest stable versions automatically |
| 62 | + - python: 2.7 |
| 63 | + env: |
| 64 | + - BUILD_LIBGEOS=3.5.0 |
18 | 65 | - python: 3.5
|
19 |
| -# - python: 2.7 |
20 |
| -# env: TEST_ARGS=--pep8 |
| 66 | + env: |
| 67 | + - BUILD_LIBGEOS=3.5.0 |
| 68 | + |
| 69 | + # "current development" environment |
| 70 | + # this test is diagnostic for development versions and is not required to pass |
| 71 | + - python: "nightly" |
| 72 | + env: |
| 73 | + # these are python packages so prepend "git+" to git URL |
| 74 | + - NUMPY=git+https://github.com/numpy/numpy.git |
| 75 | + - MPL=git+https://github.com/matplotlib/matplotlib.git |
| 76 | + - PYPROJ=git+https://github.com/jswhit/pyproj.git |
| 77 | + # C lib, git URL only |
| 78 | + - BUILD_LIBGEOS=https://github.com/libgeos/libgeos.git |
| 79 | + # or download latest stable |
| 80 | + # - BUILD_LIBGEOS=3.5.0 |
| 81 | + |
| 82 | + allow_failures: |
| 83 | + - python: "nightly" |
21 | 84 |
|
22 |
| -before_install: |
| 85 | +# before_install: |
23 | 86 | # Install into our own pristine virtualenv
|
24 |
| - - virtualenv --python=python venv |
25 |
| - - source venv/bin/activate |
| 87 | + # - virtualenv --python=python venv |
| 88 | + # - source venv/bin/activate |
26 | 89 |
|
27 | 90 | install:
|
28 | 91 | # Upgrade pip and setuptools. Mock has issues with the default version of
|
29 | 92 | # setuptools
|
30 |
| - - | |
31 |
| - pip install --upgrade pip |
32 |
| - pip install --upgrade setuptools |
33 |
| - pip install $NUMPY |
34 |
| - pip install $MPL |
35 |
| - pip install -r requirements.txt |
36 |
| - |
| 93 | + - pip install --upgrade pip |
| 94 | + - pip install --upgrade setuptools |
| 95 | + |
| 96 | + # the development version of numpy requires Cython |
| 97 | + - if [[ $TRAVIS_PYTHON_VERSION == 'nightly' ]]; then pip install --install-option="--no-cython-compile" Cython; fi |
| 98 | + |
| 99 | + # workaround for "middle of the road" configuration to use pre-installed numpy, others "upgrade" numpy |
| 100 | + - if [[ $TRAVIS_PYTHON_VERSION != '3.4' ]]; then pip install --upgrade $NUMPY; fi |
| 101 | + |
| 102 | + - pip install --upgrade $MPL |
| 103 | + - pip install --upgrade $PYPROJ |
| 104 | + - pip install -r requirements.txt |
| 105 | + |
| 106 | + # extra requirements to support Python 2.6 |
37 | 107 | - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r .requirements-2.6.txt; fi
|
38 | 108 |
|
| 109 | + # compile GEOS internally or download external version to compile |
39 | 110 | - |
|
40 |
| - cd geos-3.3.3 |
41 |
| - export GEOS_DIR=$HOME/.local/ |
42 |
| - ./configure --prefix=$GEOS_DIR |
43 |
| - make; make install |
44 |
| - cd .. |
| 111 | + if [[ $BUILD_LIBGEOS != 'false' ]]; then |
| 112 | + if [[ $BUILD_LIBGEOS == 'internal' ]]; then |
| 113 | + echo 'Building internal libgeos' |
| 114 | + cd geos-3.3.3 |
| 115 | + # does this string contain a "git" substring? |
| 116 | + elif [[ $BUILD_LIBGEOS == *"git"* ]]; then |
| 117 | + echo 'Using git to download libgeos development' |
| 118 | + git clone ${BUILD_LIBGEOS} |
| 119 | + cd libgeos |
| 120 | + ./autogen.sh |
| 121 | + else |
| 122 | + echo 'Downloading and building external libgeos' |
| 123 | + wget https://github.com/libgeos/libgeos/archive/${BUILD_LIBGEOS}.tar.gz |
| 124 | + tar zxf ${BUILD_LIBGEOS}.tar.gz |
| 125 | + cd libgeos-${BUILD_LIBGEOS} |
| 126 | + ./autogen.sh |
| 127 | + fi |
| 128 | + export GEOS_DIR=$HOME/.local/ |
| 129 | + ./configure --prefix=$GEOS_DIR |
| 130 | + make; make install |
| 131 | + cd .. |
| 132 | + fi |
45 | 133 | # - pip install pep8
|
46 |
| - - python setup.py install |
| 134 | + - pip install . |
47 | 135 |
|
48 | 136 | script:
|
49 | 137 | - python lib/mpl_toolkits/basemap/test.py --verbose
|
50 | 138 |
|
| 139 | + |
0 commit comments