From f3260d2ca3fab096b44abd7647bd0dde95da6df8 Mon Sep 17 00:00:00 2001 From: ZuluPro Date: Fri, 18 Sep 2015 00:29:01 -0400 Subject: [PATCH 1/2] Make clearer travis display --- .travis.yml | 24 +++++++++++++++--------- tox.ini | 12 ++++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc756ce29a..bee847c066 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,31 @@ language: python -python: 2.7 +python: + - 2.6 + - 2.7 + - 3.2 + - 3.3 + - 3.4 + - "pypy" sudo: false os: - linux - osx env: - - TOX_ENV=lint - - TOX_ENV=py26 - - TOX_ENV=py27 - - TOX_ENV=pypy - - TOX_ENV=py32 - - TOX_ENV=py33 - - TOX_ENV=py34 - - TOX_ENV=docs matrix: fast_finish: true allow_failures: - os: osx + include: + - python: 2.7 + env: ENV=lint + before_script: TOX_ENV=lint + - python: 2.7 + env: ENV=docs + before_script: TOX_ENV=docs install: + - TOX_ENV=py$TRAVIS_PYTHON_VERSION - pip install tox script: diff --git a/tox.ini b/tox.ini index 9df229ad46..77a7558858 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py25,py26,py27,pypy,py32,py33,py34,lint +envlist = py2.5,py2.6,py2.7,pypypy,py3.2,py3.3,py3.4,lint setenv = PIP_USE_MIRRORS=1 @@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements-tests.txt commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py python setup.py test -[testenv:py25] +[testenv:py2.5] setenv = PIP_INSECURE=1 deps = -r{toxinidir}/requirements-tests.txt backports.ssl_match_hostname @@ -22,21 +22,21 @@ deps = -r{toxinidir}/requirements-tests.txt simplejson paramiko -[testenv:pypy] +[testenv:pypypy] deps = -r{toxinidir}/requirements-tests.txt backports.ssl_match_hostname unittest2 lockfile -[testenv:py32] +[testenv:py3.2] deps = -r{toxinidir}/requirements-tests.txt lockfile -[testenv:py33] +[testenv:py3.3] deps = -r{toxinidir}/requirements-tests.txt lockfile -[testenv:py34] +[testenv:py3.4] # At some point we can switch to use the stdlib provided mock module on # Python3.4+ deps = -r{toxinidir}/requirements-tests.txt From 9ce99b8ae90f30a28df15408390e6dd01f6222fb Mon Sep 17 00:00:00 2001 From: ZuluPro Date: Mon, 21 Sep 2015 20:36:47 -0400 Subject: [PATCH 2/2] Factorize and clean tox.ini --- .travis.yml | 1 + tox.ini | 57 +++++++++++++++-------------------------------------- 2 files changed, 17 insertions(+), 41 deletions(-) diff --git a/.travis.yml b/.travis.yml index bee847c066..c48d86af7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: python +# Add or remove version for match with Travis support python: - 2.6 - 2.7 diff --git a/tox.ini b/tox.ini index 77a7558858..69b092ff25 100644 --- a/tox.ini +++ b/tox.ini @@ -1,52 +1,28 @@ [tox] -envlist = py2.5,py2.6,py2.7,pypypy,py3.2,py3.3,py3.4,lint -setenv = - PIP_USE_MIRRORS=1 +envlist = py{2.5,2.6,2.7,pypy,3.2,3.3,3.4,3.5},lint [testenv] -deps = -r{toxinidir}/requirements-tests.txt - backports.ssl_match_hostname - unittest2 - lockfile - paramiko +deps = + -r{toxinidir}/requirements-tests.txt + lockfile + py{2.5,2.6,2.7,pypy}: paramiko + py{2.5,2.6}: unittest2 commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py python setup.py test - -[testenv:py2.5] -setenv = PIP_INSECURE=1 -deps = -r{toxinidir}/requirements-tests.txt - backports.ssl_match_hostname - unittest2 - lockfile - ssl - simplejson - paramiko - -[testenv:pypypy] -deps = -r{toxinidir}/requirements-tests.txt - backports.ssl_match_hostname - unittest2 - lockfile - -[testenv:py3.2] -deps = -r{toxinidir}/requirements-tests.txt - lockfile - -[testenv:py3.3] -deps = -r{toxinidir}/requirements-tests.txt - lockfile - -[testenv:py3.4] -# At some point we can switch to use the stdlib provided mock module on -# Python3.4+ -deps = -r{toxinidir}/requirements-tests.txt - lockfile +basepython = + py2.5: python2.5 + py2.6: python2.6 + {py2.7,lint,pylint,docs}: python2.7 + pypypy: pypy + py3.2: python3.2 + py3.3: python3.3 + py3.4: python3.4 +whitelist_externals = cp [testenv:docs] deps = sphinx pysphere backports.ssl_match_hostname -basepython = python2.7 changedir = docs commands = python ../contrib/generate_provider_feature_matrix_table.py sphinx-apidoc -d 2 ../libcloud/ -o apidocs/ @@ -55,11 +31,10 @@ commands = python ../contrib/generate_provider_feature_matrix_table.py [testenv:scrape-ec2-prices] deps = requests demjson -basepython = python2.7 commands = python contrib/scrape-ec2-prices.py [testenv:pylint] -depds = pylint +deps = pylint backports.ssl_match_hostname commands = pylint --rcfile=.pylintrc -E libcloud/