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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
sudo: false
env:
global:
- NUMPY=numpy
- MPL=matplotlib
- PYPROJ=pyproj
- TEST_ARGS=--no-pep8
- BUILD_LIBGEOS=false
# install apt binary packages
addons:
apt:
packages:
- libgeos-3.4.2
# matplotlib requirements
- libpng12-dev
- libfreetype6-dev
# helpers utilities
- autotools-dev
- wget
language: python
cache:
directories:
# cache for wheels generated by pip
- $HOME/.cache/pip
# cache for libgeos library binaries
- $HOME/.libgeos
# matrix generates 6 test cases
matrix:
include:
# "minimum requirements" environments
# test the bare minimum versions
# compiles internal libgeos
# Notes:
# numpy 1.7.0 is the first version that works out of the box for Python 2.6 and 3.3
# numpy 1.5.1 is the earliest version to compile and *might* be able to work on Python 2.6,
# if two unit tests are skipped due to numpy.copy(a,order) not having 'order' parameter
# 1.6.0-1.6.2 works out of the box for Python 2.6
# matplotlib 1.2.0 was found to be the earliest version that installs
- python: 2.6
env:
- NUMPY=numpy==1.7.0
- MPL=matplotlib==1.2.0
- BUILD_LIBGEOS=internal
# "middle of the road" environment
# use prepackaged binaries
# if no prepackaged binary available, use a previous stable version
- python: 3.4
env:
- MPL=matplotlib==1.4.3
- NUMPY=numpy==1.9.3
- BUILD_LIBGEOS=internal
# "latest and greatest" stable environments
# this uses the current stable versions
# pip installs latest stable versions automatically
- python: 2.7
env:
- BUILD_LIBGEOS=3.5.1
- python: 3.5
env:
- BUILD_LIBGEOS=3.5.1
- python: 3.6
env:
- BUILD_LIBGEOS=3.6.1
# "current development" environment
# this test is diagnostic for development versions and is not required to pass
- python: "nightly"
env:
# these are python packages so prepend "git+" to git URL
- NUMPY=git+https://github.com/numpy/numpy.git
- MPL=git+https://github.com/matplotlib/matplotlib.git
- PYPROJ=git+https://github.com/jswhit/pyproj.git
# C lib, git URL only
- BUILD_LIBGEOS=https://github.com/libgeos/libgeos.git
# or download latest stable
# - BUILD_LIBGEOS=3.5.0
allow_failures:
- python: "nightly"
# before_install:
# Install into our own pristine virtualenv
# - virtualenv --python=python venv
# - source venv/bin/activate
install:
# Upgrade pip and setuptools. Install wheel.
- pip install --upgrade pip
- pip install --upgrade setuptools
- pip install wheel
# the development version of numpy requires Cython
- if [[ $TRAVIS_PYTHON_VERSION == 'nightly' ]]; then pip install --install-option="--no-cython-compile" Cython; fi
- pip install --upgrade $NUMPY
- pip install $MPL
- pip install $PYPROJ
- pip install -r requirements.txt
# extra requirements to support Python 2.6
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r .requirements-2.6.txt; fi
- |
# Is libgeos suppose to be built?
if [[ $BUILD_LIBGEOS != 'false' ]]; then
export GEOS_DIR=$HOME/.libgeos/${BUILD_LIBGEOS}/
# Does this path (for libgeos binaries) not exist in cache?
if [[ ! -d "$GEOS_DIR" ]] ; then
# Download and Compile libgeos
if [[ $BUILD_LIBGEOS == 'internal' ]]; then
echo 'Building internal libgeos'
cd geos-3.3.3
# Does this string contain a "git" substring?
elif [[ $BUILD_LIBGEOS == *"git"* ]]; then
echo 'Using git to download libgeos development'
git clone ${BUILD_LIBGEOS}
cd libgeos
./autogen.sh
# do NOT cache libgeos git
export GEOS_DIR=$HOME/dont-cache-me/
else
echo 'Downloading and building external libgeos'
wget https://github.com/libgeos/libgeos/archive/${BUILD_LIBGEOS}.tar.gz
tar zxf ${BUILD_LIBGEOS}.tar.gz
cd geos-${BUILD_LIBGEOS}
./autogen.sh
fi
./configure --prefix=$GEOS_DIR
make; make install
cd ..
fi
fi
# - pip install pep8
- pip install .
script:
- python lib/mpl_toolkits/basemap/test.py --verbose
|