From 8c92b6fb06a538ca1d0c14f6ec2a7a50d10ca538 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sat, 14 Mar 2020 17:32:58 +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]. Allow the latest matching pycodestyle to be automatically installed. Use libsqlite3-mod-spatialite to save compile time. [1] https://github.com/PyCQA/pyflakes/issues/367 --- .travis.yml | 32 ++++++++++++++------------------ install-spatialite.sh | 20 -------------------- requirements.txt | 3 +-- tox.ini | 29 +++++++++++++++++++++-------- 4 files changed, 36 insertions(+), 48 deletions(-) delete mode 100755 install-spatialite.sh diff --git a/.travis.yml b/.travis.yml index ebb66935..9dece228 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,28 @@ 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: pypy + - python: 3.6 + env: + - TOX_ENV=py36sqla11 + - python: 3.7 + env: + - TOX_ENV=py37sqla11 + - python: 3.8 + env: + - TOX_ENV=py38sqla11 + - python: pypy3 env: - TOX_ENV=pypysqla11 -env: - global: - - SPATIALITE_LIBRARY_PATH="/usr/local/lib/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..71462fa7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,7 @@ -e . # 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..eb4a854a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,7 @@ [tox] -envlist=py27sqla11, py34sqla11, py35sqla11, pypysqla11 +envlist=py27sqla11, py35sqla11, py36sqla11, py37sqla11, py38sqla11, pypysqla11 [testenv] -passenv=SPATIALITE_LIBRARY_PATH commands= py.test \ {posargs} @@ -15,23 +14,37 @@ 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:pypysqla11] -basepython=pypy +[testenv:py37sqla11] +basepython=python3.7 deps= SQLAlchemy==1.1.2 + psycopg2 + -rrequirements.txt + +[testenv:py38sqla11] +basepython=python3.8 +deps= + SQLAlchemy==1.1.2 + psycopg2 + -rrequirements.txt + +[testenv:pypysqla11] +basepython=pypy3 +deps= + SQLAlchemy==1.3.15 psycopg2cffi -rrequirements.txt