forked from caioariede/django-location-field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
46 lines (41 loc) · 1.75 KB
/
tox.ini
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
[tox]
envlist = {lnx,osx}-Django17,{lnx,osx}-Django18,{lnx,osx}-Django19
platform = linux|darwin
[testenv]
basepython = python2
setenv =
PYSQLITEURL=https://github.com/ghaering/pysqlite/archive/master.zip
PYSQLITEDIR={envtmpdir}/pysqlite-master
osx-Django{17,18,19}: PYSQLITEINCLUDEDIR=/usr/local/opt/sqlite/include
osx-Django{17,18,19}: PYSQLITELIBRARYDIR=/usr/local/opt/sqlite/lib
lnx-Django{17,18,19}: PYSQLITEINCLUDEDIR=/usr/include
lnx-Django{17,18,19}: PYSQLITELIBRARYDIR=/usr/lib/x86_64-linux-gnu
whitelist_externals =
bash
commands =
# Build SpatiaLite
bash -c "test -e $PYSQLITEINCLUDEDIR/sqlite3.h"
bash -c "ls $PYSQLITELIBRARYDIR/libsqlite3.* &> /dev/null"
bash -c "mkdir -p {envtmpdir}"
bash -c "wget $PYSQLITEURL -O {envtmpdir}/pysqlite.zip"
bash -c "pushd {envtmpdir} && unzip pysqlite.zip && popd"
bash -c "mv $PYSQLITEDIR/setup.cfg $PYSQLITEDIR/setup.cfg.bkp"
bash -c "grep -v define=SQLITE_OMIT_LOAD_EXTENSION $PYSQLITEDIR/setup.cfg.bkp > $PYSQLITEDIR/setup.cfg"
bash -c "echo include_dirs=$PYSQLITEINCLUDEDIR >> $PYSQLITEDIR/setup.cfg"
bash -c "echo library_dirs=$PYSQLITELIBRARYDIR >> $PYSQLITEDIR/setup.cfg"
bash -c "rm -rf $PYSQLITEDIR/build"
- bash -c "cd $PYSQLITEDIR && {envbindir}/python setup.py build_static"
bash -c "cd $PYSQLITEDIR && {envbindir}/python setup.py install"
bash -c "cd $PYSQLITEDIR && {envbindir}/pip install ."
bash -c "{envpython} setup.py test"
deps =
{lnx,osx}-Django17: Django>=1.7, < 1.8
{lnx,osx}-Django18: Django>=1.8, < 1.9
{lnx,osx}-Django19: Django>=1.9, < 2.0
# pysqlite does not support Python 3 yet
# https://github.com/ghaering/pysqlite/issues/72
#
# [testenv:Django18-py3]
# basepython = python3
# deps =
# Django==1.8