From 81e1ecef1c46bb038e3cd420ba5bb6e8c149ebdb Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Fri, 13 Mar 2020 19:49:17 +0000 Subject: [PATCH] Update test matrix removing Python 3.4 and adding 3.6, 3.7, 3.8 Python 3.4 is now EOL. Update to Xenial required for Python 3.7 and 3.8 on Travis. Update flake8 to use Python 3.8 compatible pyflakes [1]. Use libsqlite3-mod-spatialite to save compile time. [1] https://github.com/PyCQA/pyflakes/issues/367 --- .travis.yml | 28 ++++++++++++++-------------- install-spatialite.sh | 20 -------------------- requirements.txt | 2 +- tox.ini | 24 +++++++++++++++++++----- 4 files changed, 34 insertions(+), 40 deletions(-) delete mode 100755 install-spatialite.sh diff --git a/.travis.yml b/.travis.yml index ebb66935..4e2df88a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: python sudo: true -dist: trusty +dist: xenial addons: - postgresql: 9.3 + postgresql: 9.6 apt: packages: - - postgresql-9.3-postgis-2.3 + - postgresql-9.6-postgis-2.4 - python2.7-dev - python3-dev - autotools-dev @@ -17,6 +17,7 @@ addons: - libproj-dev - libreadline-dev - libsqlite3-dev + - libsqlite3-mod-spatialite - libxml2-dev - zlib1g-dev @@ -27,33 +28,32 @@ notifications: services: - postgresql -cache: - directories: - - libspatialite-4.3.0a - matrix: include: - python: 2.7 env: - TOX_ENV=py27sqla11 - - python: 3.4 - env: - - TOX_ENV=py34sqla11 - python: 3.5 env: - TOX_ENV=py35sqla11 + - python: 3.6 + env: + - TOX_ENV=py36sqla11 + - python: 3.7 + env: + - TOX_ENV=py37sqla11 + - python: 3.8 + env: + - TOX_ENV=py38sqla11 - python: pypy env: - TOX_ENV=pypysqla11 env: global: - - SPATIALITE_LIBRARY_PATH="/usr/local/lib/mod_spatialite.so" + - SPATIALITE_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/mod_spatialite.so" install: - # Install Spatialite - - ./install-spatialite.sh - # Install tox - pip install tox diff --git a/install-spatialite.sh b/install-spatialite.sh deleted file mode 100755 index c15f2971..00000000 --- a/install-spatialite.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e - -LIBSPATIALITE="libspatialite-4.3.0a" - -if [[ ! -d ${LIBSPATIALITE}/src/.libs ]]; then - - wget http://www.gaia-gis.it/gaia-sins/${LIBSPATIALITE}.tar.gz - tar xvzf ${LIBSPATIALITE}.tar.gz - - cd ${LIBSPATIALITE} - - ./configure --disable-freexl --disable-libxml2 - make -j2 -else - cd ${LIBSPATIALITE} -fi - -sudo make install diff --git a/requirements.txt b/requirements.txt index f776ce08..e3760c2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # Additional requirements for running the testsuite and development pycodestyle==2.2.0 -flake8==3.2.0 +flake8==3.7.9 pytest==3.7.4 pytest-cov==2.5.1 diff --git a/tox.ini b/tox.ini index 3265154f..e7560d2b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27sqla11, py34sqla11, py35sqla11, pypysqla11 +envlist=py27sqla11, py35sqla11, py36sqla11, py37sqla11, py38sqla11, pypysqla11 [testenv] passenv=SPATIALITE_LIBRARY_PATH @@ -15,15 +15,29 @@ deps= pysqlite -rrequirements.txt -[testenv:py34sqla11] -basepython=python3.4 +[testenv:py35sqla11] +basepython=python3.5 deps= SQLAlchemy==1.1.2 psycopg2 -rrequirements.txt -[testenv:py35sqla11] -basepython=python3.5 +[testenv:py36sqla11] +basepython=python3.6 +deps= + SQLAlchemy==1.1.2 + psycopg2 + -rrequirements.txt + +[testenv:py37sqla11] +basepython=python3.7 +deps= + SQLAlchemy==1.1.2 + psycopg2 + -rrequirements.txt + +[testenv:py38sqla11] +basepython=python3.8 deps= SQLAlchemy==1.1.2 psycopg2