forked from caioariede/django-location-field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (31 loc) · 1.13 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
# Travis setup to work with Python 2, Python 3, GDAL and SpatiaLite
# Based on: https://github.com/postfalk/travisgis/blob/master/.travis.yml
dist: xenial
language: python
matrix:
include:
- python: 2.7
env: TOXENV=dj111
- python: 3.6
env: TOXENV=dj20
- python: 3.7
env: TOXENV=dj21
- python: 3.7
env: TOXENV=dj22
before_install:
# update packages
- "sudo apt-get update -y"
# install python packages
- "sudo apt install -y python-dev python3-dev python-pip"
# install gdal
- "sudo apt install -y libgdal-dev libproj-dev libproj-dev"
# spatialite deps (see https://docs.djangoproject.com/en/2.0/ref/contrib/gis/install/spatialite/)
- "sudo apt install -y libsqlite3-dev spatialite-bin libsqlite3-mod-spatialite"
install:
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install --global-option=build_ext --global-option='-USQLITE_OMIT_LOAD_EXTENSION' pysqlite; fi
# install python gdal package (version must match installed GDAL lib)
- CFLAGS=-I/usr/include/gdal pip install GDAL==$(gdal-config --version | cut -d. -f1-2).*
# other dependencies
- pip install tox
script:
- tox