From bc0699e43b0f122187c49ed71da92edf60c17b35 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 16:58:04 +0200 Subject: [PATCH 01/15] Replace Python interpreters with tox environments --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f359de1be..751ccca79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,13 +3,13 @@ language: python os: - linux -python: - - "pypy" - - "2.6" - - "2.7" - - "3.2" - - "3.3" - - "3.4" +env: + - TOX_ENV=py26 + - TOX_ENV=py27 + - TOX_ENV=py33 + - TOX_ENV=py34 + - TOX_ENV=pypy + - TOX_ENV=docs matrix: include: From 778b30a49b220dfb81c40eb705dc71df85fccd7f Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 16:58:24 +0200 Subject: [PATCH 02/15] Reformat before_install --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 751ccca79..764e8a5df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,10 @@ matrix: OPENSSL=0.9.8 before_install: - - if [ -n "$CRYPTOGRAPHY_GIT_MASTER" ]; then pip install git+https://github.com/pyca/cryptography.git;fi + - | + if [ -n "$CRYPTOGRAPHY_GIT_MASTER" ]; then + pip install git+https://github.com/pyca/cryptography.git + fi install: # Install the wheel library explicitly here. It is not really a setup From 659fb53083fba298c43cc3e3cd514889e4f6c811 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 17:26:31 +0200 Subject: [PATCH 03/15] Express matrix as a bunch of env vars --- .travis.yml | 54 +++++++++++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/.travis.yml b/.travis.yml index 764e8a5df..1f72522db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,42 +4,30 @@ os: - linux env: - - TOX_ENV=py26 - - TOX_ENV=py27 - - TOX_ENV=py33 - - TOX_ENV=py34 - - TOX_ENV=pypy - - TOX_ENV=docs + matrix: + # Supported environments: + - TOX_ENV=py26 + - TOX_ENV=py27 + - TOX_ENV=py33 + - TOX_ENV=py34 + - TOX_ENV=pypy -matrix: - include: - # Also run the tests against cryptography master. - - python: "2.6" - env: - CRYPTOGRAPHY_GIT_MASTER=true - - python: "2.7" - env: - CRYPTOGRAPHY_GIT_MASTER=true - - python: "3.2" - env: - CRYPTOGRAPHY_GIT_MASTER=true - - python: "3.3" - env: - CRYPTOGRAPHY_GIT_MASTER=true - - python: "3.4" - env: - CRYPTOGRAPHY_GIT_MASTER=true - - python: "pypy" - env: - CRYPTOGRAPHY_GIT_MASTER=true + # Also run the tests against cryptography master. + - TOX_ENV=py26 CRYPTOGRAPHY_GIT_MASTER=true + - TOX_ENV=py27 CRYPTOGRAPHY_GIT_MASTER=true + - TOX_ENV=py33 CRYPTOGRAPHY_GIT_MASTER=true + - TOX_ENV=py34 CRYPTOGRAPHY_GIT_MASTER=true + - TOX_ENV=pypy CRYPTOGRAPHY_GIT_MASTER=true - # Also run at least a little bit against an older version of OpenSSL. - - python: "2.7" - env: - OPENSSL=0.9.8 + # Also run at least a little bit against an older version of OpenSSL. + - TOX_ENV=py27 OPENSSL=0.9.8 - # Let the cryptography master builds fail because they might be triggered by - # cryptography changes beyond our control. + # Also test packaging metadata. + - TOX_ENV=meta + +matrix: + # Let the cryptography master builds fail, because they might be + # triggered by cryptography changes beyond our control. allow_failures: - env: CRYPTOGRAPHY_GIT_MASTER=true From 6bf1ced81f679d86c7380b2506e8a7ae7ea167db Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 17:33:51 +0200 Subject: [PATCH 04/15] Move installing Cryptography Git master to install --- .travis.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f72522db..e0ac7f544 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,13 +34,21 @@ matrix: - env: OPENSSL=0.9.8 -before_install: +install: + # In some builds, install the Git master of the cryptography library. - | if [ -n "$CRYPTOGRAPHY_GIT_MASTER" ]; then pip install git+https://github.com/pyca/cryptography.git fi -install: + # In some builds, install an old version of OpenSSL. + - | + if [[ "${OPENSSL}" == "0.9.8" ]]; then + sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" + sudo apt-get -y update + sudo apt-get install -y --force-yes libssl-dev/lucid + fi + # Install the wheel library explicitly here. It is not really a setup # dependency. It is not an install dependency. It is only a dependency for # the script directive below - because we want to exercise wheel building on @@ -52,12 +60,6 @@ install: - pip install coveralls coverage script: - - | - if [[ "${OPENSSL}" == "0.9.8" ]]; then - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main" - sudo apt-get -y update - sudo apt-get install -y --force-yes libssl-dev/lucid - fi - | pip install -e . - | From 36c59d0a935e6611893b93fe5d2930c7b8e61258 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 18:16:18 +0200 Subject: [PATCH 05/15] Remove vestigial part of parent branch --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e0ac7f544..d50ea4463 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,9 +22,6 @@ env: # Also run at least a little bit against an older version of OpenSSL. - TOX_ENV=py27 OPENSSL=0.9.8 - # Also test packaging metadata. - - TOX_ENV=meta - matrix: # Let the cryptography master builds fail, because they might be # triggered by cryptography changes beyond our control. From 820a2ff65c9856ea3ac4adf20078a275e7d042dc Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 21:22:38 +0200 Subject: [PATCH 06/15] Add a ton of tox environments --- .travis.yml | 35 ++++++++++++++--------------- tox.ini | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index d50ea4463..0e47f2ed0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,38 +6,35 @@ os: env: matrix: # Supported environments: + - TOX_ENV=pypy - TOX_ENV=py26 - TOX_ENV=py27 + - TOX_ENV=py32 - TOX_ENV=py33 - - TOX_ENV=py34 - - TOX_ENV=pypy # Also run the tests against cryptography master. - - TOX_ENV=py26 CRYPTOGRAPHY_GIT_MASTER=true - - TOX_ENV=py27 CRYPTOGRAPHY_GIT_MASTER=true - - TOX_ENV=py33 CRYPTOGRAPHY_GIT_MASTER=true - - TOX_ENV=py34 CRYPTOGRAPHY_GIT_MASTER=true - - TOX_ENV=pypy CRYPTOGRAPHY_GIT_MASTER=true + - TOX_ENV=pypy-cryptographymaster + - TOX_ENV=py26-cryptographymaster + - TOX_ENV=py27-cryptographymaster + - TOX_ENV=py32-cryptographymaster + - TOX_ENV=py33-cryptographymaster # Also run at least a little bit against an older version of OpenSSL. - TOX_ENV=py27 OPENSSL=0.9.8 matrix: - # Let the cryptography master builds fail, because they might be - # triggered by cryptography changes beyond our control. allow_failures: - - env: - CRYPTOGRAPHY_GIT_MASTER=true - - env: - OPENSSL=0.9.8 + # Let the cryptography master builds fail, because they might be + # triggered by cryptography changes beyond our control. + - env: TOX_ENV=pypy-cryptographymaster + - env: TOX_ENV=py26-cryptographymaster + - env: TOX_ENV=py27-cryptographymaster + - env: TOX_ENV=py32-cryptographymaster + - env: TOX_ENV=py33-cryptographymaster -install: - # In some builds, install the Git master of the cryptography library. - - | - if [ -n "$CRYPTOGRAPHY_GIT_MASTER" ]; then - pip install git+https://github.com/pyca/cryptography.git - fi + - env: OPENSSL=0.9.8 +install: # In some builds, install an old version of OpenSSL. - | if [[ "${OPENSSL}" == "0.9.8" ]]; then diff --git a/tox.ini b/tox.ini index 67386d1a8..a3114d36b 100644 --- a/tox.ini +++ b/tox.ini @@ -7,4 +7,65 @@ setenv = # with extra packages. PYTHONPATH= # The standard library unittest module can run tests on Python 2.7 and newer -commands = python setup.py test +commands = + python setup.py test + +[testenv:pypy] +basepython = pypy +deps = + {[testenv]deps} + cryptography==0.4 + +[testenv:py26] +basepython = py26 +deps = + {[testenv]deps} + cryptography==0.4 + +[testenv:py27] +basepython = py27 +deps = + {[testenv]deps} + cryptography==0.4 + +[testenv:py32] +basepython = py32 +deps = + {[testenv]deps} + cryptography==0.4 + +[testenv:py33] +basepython = py33 +deps = + {[testenv]deps} + cryptography==0.4 + +[testenv:pypy-cryptographymaster] +basepython = pypy +deps = + {[testenv]deps} + -egit+https://github.com/pyca/cryptography.git#egg=cryptography + +[testenv:py26-cryptographymaster] +basepython = py26 +deps = + {[testenv]deps} + -egit+https://github.com/pyca/cryptography.git#egg=cryptography + +[testenv:py27-cryptographymaster] +basepython = py27 +deps = + {[testenv]deps} + -egit+https://github.com/pyca/cryptography.git#egg=cryptography + +[testenv:py32-cryptographymaster] +basepython = py32 +deps = + {[testenv]deps} + -egit+https://github.com/pyca/cryptography.git#egg=cryptography + +[testenv:py33-cryptographymaster] +basepython = py33 +deps = + {[testenv]deps} + -egit+https://github.com/pyca/cryptography.git#egg=cryptography From 064b0bee2d20d5ffa9f2f5040f4517c121a3f60c Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 21:27:38 +0200 Subject: [PATCH 07/15] Indenting consistency --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e47f2ed0..bafd5fdb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,7 +64,7 @@ script: python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))" after_success: - - coveralls + - coveralls notifications: email: false From 2ae194b02d294c7995ea7979365bb888b5613b7d Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 21:27:54 +0200 Subject: [PATCH 08/15] Actually use tox in travis.yml --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index bafd5fdb1..167e2062d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,14 +54,7 @@ install: - pip install coveralls coverage script: - - | - pip install -e . - - | - coverage run --branch --source=OpenSSL setup.py bdist_wheel test - - | - coverage report -m - - | - python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))" + - tox -e $TOX_ENV after_success: - coveralls From 8badff9423444ae08a299f4638b2cb1c2a1d089e Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 21:29:00 +0200 Subject: [PATCH 09/15] Run the equivalent of the travis commands in tox --- tox.ini | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a3114d36b..2095efab5 100644 --- a/tox.ini +++ b/tox.ini @@ -2,13 +2,20 @@ envlist = pypy,py26,py27,py32,py33 [testenv] +deps = + # Only required to build wheels as part of test cycle: + wheel==0.23.0 setenv = # Do not allowed the executing environment to pollute the test environment # with extra packages. PYTHONPATH= # The standard library unittest module can run tests on Python 2.7 and newer commands = - python setup.py test + coverage run --branch --source=OpenSSL \ + python setup.py test + coverage report --show-missing + python setup.py bdist_wheel + python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))" [testenv:pypy] basepython = pypy From 1c774d3f95f286aa1129f91e03a2e36a5a600eec Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 21:30:11 +0200 Subject: [PATCH 10/15] Add coverage to tox.ini, remove from travis.yml --- .travis.yml | 10 +--------- tox.ini | 1 + 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 167e2062d..99475e03a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,15 +43,7 @@ install: sudo apt-get install -y --force-yes libssl-dev/lucid fi - # Install the wheel library explicitly here. It is not really a setup - # dependency. It is not an install dependency. It is only a dependency for - # the script directive below - because we want to exercise wheel building on - # travis. - - pip install wheel - - # Also install some tools for measuring code coverage and sending the results - # to coveralls. - - pip install coveralls coverage + - pip install coveralls script: - tox -e $TOX_ENV diff --git a/tox.ini b/tox.ini index 2095efab5..164e9625e 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist = pypy,py26,py27,py32,py33 deps = # Only required to build wheels as part of test cycle: wheel==0.23.0 + coverage==3.7.1 setenv = # Do not allowed the executing environment to pollute the test environment # with extra packages. From b689456aed141273fc6458f54ead23e05faed4b6 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Mon, 23 Jun 2014 21:30:21 +0200 Subject: [PATCH 11/15] Move comment to a more logical place --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 164e9625e..fe48fdbbd 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,8 @@ setenv = # Do not allowed the executing environment to pollute the test environment # with extra packages. PYTHONPATH= -# The standard library unittest module can run tests on Python 2.7 and newer commands = + # The standard library unittest module can run tests on Python 2.7 and newer coverage run --branch --source=OpenSSL \ python setup.py test coverage report --show-missing From a024f825a3e0ea864b81c9e052e4e34f41cdf9cd Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Tue, 24 Jun 2014 09:01:17 +0200 Subject: [PATCH 12/15] Actually install tox --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 99475e03a..b6e7f7eca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,9 @@ install: sudo apt-get install -y --force-yes libssl-dev/lucid fi + # Tox actually builds our individual testing virtualenvs. + - pip install tox + - pip install coveralls script: From 20d9f826ac4e74b9cc3ed947db90bc77b7cd249c Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Tue, 24 Jun 2014 12:14:30 +0200 Subject: [PATCH 13/15] Don't specify Python binary coverage does the right thing when you point it at a python file --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index fe48fdbbd..5872a6993 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,7 @@ setenv = PYTHONPATH= commands = # The standard library unittest module can run tests on Python 2.7 and newer - coverage run --branch --source=OpenSSL \ - python setup.py test + coverage run --branch --source=OpenSSL setup.py test coverage report --show-missing python setup.py bdist_wheel python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))" From 58ebabe6494680065de4dcd615cc31469f082185 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Tue, 24 Jun 2014 13:09:08 +0200 Subject: [PATCH 14/15] Fix Python interpreter binary names --- tox.ini | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 5872a6993..965cb8a39 100644 --- a/tox.ini +++ b/tox.ini @@ -24,25 +24,25 @@ deps = cryptography==0.4 [testenv:py26] -basepython = py26 +basepython = python2.6 deps = {[testenv]deps} cryptography==0.4 [testenv:py27] -basepython = py27 +basepython = python2.7 deps = {[testenv]deps} cryptography==0.4 [testenv:py32] -basepython = py32 +basepython = python3.2 deps = {[testenv]deps} cryptography==0.4 [testenv:py33] -basepython = py33 +basepython = python3.3 deps = {[testenv]deps} cryptography==0.4 @@ -54,25 +54,25 @@ deps = -egit+https://github.com/pyca/cryptography.git#egg=cryptography [testenv:py26-cryptographymaster] -basepython = py26 +basepython = python2.6 deps = {[testenv]deps} -egit+https://github.com/pyca/cryptography.git#egg=cryptography [testenv:py27-cryptographymaster] -basepython = py27 +basepython = python2.7 deps = {[testenv]deps} -egit+https://github.com/pyca/cryptography.git#egg=cryptography [testenv:py32-cryptographymaster] -basepython = py32 +basepython = python3.2 deps = {[testenv]deps} -egit+https://github.com/pyca/cryptography.git#egg=cryptography [testenv:py33-cryptographymaster] -basepython = py33 +basepython = python3.3 deps = {[testenv]deps} -egit+https://github.com/pyca/cryptography.git#egg=cryptography From 8ffcd620f60358ef488c4da9f648ed7017c8fd69 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Tue, 24 Jun 2014 13:23:54 +0200 Subject: [PATCH 15/15] Be more explicit about env that's allowed to fail --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b6e7f7eca..d9a0f57d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ matrix: - env: TOX_ENV=py32-cryptographymaster - env: TOX_ENV=py33-cryptographymaster - - env: OPENSSL=0.9.8 + - env: TOX_ENV=py27 OPENSSL=0.9.8 install: # In some builds, install an old version of OpenSSL.