summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml28
-rw-r--r--.ci/appveyor.yml66
-rw-r--r--.ci/run_with_env.cmd47
-rw-r--r--.travis.yml69
-rw-r--r--tox.ini36
5 files changed, 98 insertions, 148 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000..1201593
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,28 @@
+environment:
+ global:
+ TOXENV: py,codecov
+
+ matrix:
+ - PYTHON: C:\Python36-x64
+ - PYTHON: C:\Python27-x64
+ - PYTHON: C:\Python36
+ - PYTHON: C:\Python27
+
+init:
+ - SET PATH=%PYTHON%;%PATH%
+
+install:
+ - python -m pip install -U tox
+
+build: false
+
+test_script:
+ - python -m tox
+
+branches:
+ only:
+ - master
+ - /^.*-maintenance$/
+
+cache:
+ - '%LOCALAPPDATA%\pip\Cache'
diff --git a/.ci/appveyor.yml b/.ci/appveyor.yml
deleted file mode 100644
index caa509a..0000000
--- a/.ci/appveyor.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-# From https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
-
-environment:
- global:
- # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
- # /E:ON and /V:ON options are not enabled in the batch script intepreter
- # See: http://stackoverflow.com/a/13751649/163740
- CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\.ci\\run_with_env.cmd"
-
- matrix:
- - PYTHON: "C:\\Python27"
- PYTHON_VERSION: "2.7.x"
- PYTHON_ARCH: "32"
-
- - PYTHON: "C:\\Python27-x64"
- PYTHON_VERSION: "2.7.x"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python33"
- PYTHON_VERSION: "3.3.x"
- PYTHON_ARCH: "32"
-
- - PYTHON: "C:\\Python33-x64"
- PYTHON_VERSION: "3.3.x"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python34"
- PYTHON_VERSION: "3.4.x"
- PYTHON_ARCH: "32"
-
- - PYTHON: "C:\\Python34-x64"
- PYTHON_VERSION: "3.4.x"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python35"
- PYTHON_VERSION: "3.5.x"
- PYTHON_ARCH: "32"
-
- - PYTHON: "C:\\Python35-x64"
- PYTHON_VERSION: "3.5.x"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python36"
- PYTHON_VERSION: "3.6.x"
- PYTHON_ARCH: "32"
-
- - PYTHON: "C:\\Python36-x64"
- PYTHON_VERSION: "3.6.x"
- PYTHON_ARCH: "64"
-
-branches:
- only:
- - master
-
-install:
- - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- # Check that we have the expected version and architecture for Python
- - "python --version"
- - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- # Build data files
- - "pip install . pytest"
-
-build: false # Not a C# project, build stuff at the test step instead.
-
-test_script:
- - "%CMD_IN_ENV% python -m pytest tests"
diff --git a/.ci/run_with_env.cmd b/.ci/run_with_env.cmd
deleted file mode 100644
index 3a472bc..0000000
--- a/.ci/run_with_env.cmd
+++ /dev/null
@@ -1,47 +0,0 @@
-:: To build extensions for 64 bit Python 3, we need to configure environment
-:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
-:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
-::
-:: To build extensions for 64 bit Python 2, we need to configure environment
-:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
-:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
-::
-:: 32 bit builds do not require specific environment configurations.
-::
-:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
-:: cmd interpreter, at least for (SDK v7.0)
-::
-:: More details at:
-:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
-:: http://stackoverflow.com/a/13751649/163740
-::
-:: Author: Olivier Grisel
-:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
-@ECHO OFF
-
-SET COMMAND_TO_RUN=%*
-SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
-
-SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
-IF %MAJOR_PYTHON_VERSION% == "2" (
- SET WINDOWS_SDK_VERSION="v7.0"
-) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
- SET WINDOWS_SDK_VERSION="v7.1"
-) ELSE (
- ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
- EXIT 1
-)
-
-IF "%PYTHON_ARCH%"=="64" (
- ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
- SET DISTUTILS_USE_SDK=1
- SET MSSdk=1
- "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
- "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
- ECHO Executing: %COMMAND_TO_RUN%
- call %COMMAND_TO_RUN% || EXIT 1
-) ELSE (
- ECHO Using default MSVC build environment for 32 bit architecture
- ECHO Executing: %COMMAND_TO_RUN%
- call %COMMAND_TO_RUN% || EXIT 1
-)
diff --git a/.travis.yml b/.travis.yml
index aed7083..55deb45 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,43 +1,56 @@
+os: linux
sudo: false
language: python
-python:
- - "2.7"
- - "3.4"
- - "3.5"
- - "3.6"
- - "pypy"
-env:
- - TEST_EXTRA=
- - TEST_EXTRA=colorama
+matrix:
+ include:
+ - python: 3.6
+ env: TOXENV=py,codecov
+ - python: 3.5
+ env: TOXENV=py,codecov
+ - python: 3.4
+ env: TOXENV=py,codecov
+ - python: 2.7
+ env: TOXENV=py,codecov
+ - python: pypy3
+ env: TOXENV=py,codecov
+ - python: nightly
+ env: TOXENV=py
+ - os: osx
+ language: generic
+ env: TOXENV=py3,py2,codecov
+ cache:
+ pip: false
+ directories:
+ - $HOME/Library/Caches/Homebrew
+ - $HOME/Library/Caches/pip
+ allow_failures:
+ - python: pypy3
+ - python: nightly
+ - os: osx
+ fast_finish: true
+
+before_install:
+ - |
+ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
+ brew upgrade python
+ brew install python@2
+ export PATH="/usr/local/opt/python/libexec/bin:${PATH}"
+ fi
install:
- pip install tox
script:
- - |
- set -ex
- if [[ $TRAVIS_PYTHON_VERSION == pypy ]]; then
- TOX_PY=pypy
- else
- TOX_PY="py${TRAVIS_PYTHON_VERSION/./}"
- fi
- export TOXENV="${TOX_PY}-coverage"
- if [[ $TEST_EXTRA == colorama ]]; then
- TOXENV="$TOXENV-colorama"
- fi
- tox
- set +x
+ - tox
+
+cache:
+ - pip
branches:
only:
- master
- - auto
- - /^.*-maintenance$/
+ - /^.*-maintenance/
notifications:
email: false
-
-after_success:
- - pip install codecov
- - travis_retry codecov --env TOXENV -X fix search gcov --required --flags $TOX_PY $TEST_EXTRA
diff --git a/tox.ini b/tox.ini
index ef4a703..1f68f4d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,13 +1,35 @@
[tox]
-envlist = py27,py34,py35,py36,pypy
-skip_missing_interpreters = true
+envlist = py{36,35,34,27,py}
[testenv]
passenv = LANG
-commands = {env:TEST_RUNNER:pytest} {posargs}
deps =
pytest
- colorama: colorama
- coverage: coverage
-setenv =
- coverage: TEST_RUNNER=coverage run -m pytest
+ coverage
+ colorama
+commands = coverage run -p -m pytest {posargs:tests}
+
+[testenv:docs-html]
+deps = sphinx
+commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
+
+[testenv:docs-linkcheck]
+deps = sphinx
+commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs {envtmpdir}/linkcheck
+
+[testenv:coverage-report]
+deps = coverage
+skip_install = true
+commands =
+ coverage combine
+ coverage report
+ coverage html
+
+[testenv:codecov]
+passenv = CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_*
+deps = codecov
+skip_install = true
+commands =
+ coverage combine
+ coverage report
+ codecov