From ade80a175d231d3f6347364c5a318571ded4d6bd Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Thu, 19 Jun 2014 18:07:01 +0200 Subject: [PATCH 01/17] Add a meta testenv for metadata: style & packaging --- tox.ini | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 67386d1a8..39bcf09f7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pypy,py26,py27,py32,py33 +envlist = pypy,py26,py27,py32,py33,meta [testenv] setenv = @@ -8,3 +8,19 @@ setenv = PYTHONPATH= # The standard library unittest module can run tests on Python 2.7 and newer commands = python setup.py test + +[testenv:meta] +deps = + pyflakes==0.8.1 + check-manifest==0.21 + pip-tools==0.3.4 + pyroma==1.6 +commands = + pyflakes OpenSSL + check-manifest + pip-review + # Work around a bug in pyroma where it returns 1 when it should + # return 0, causing tox to believe it failed. + # https://bitbucket.org/regebro/pyroma/issue/18 + sh -c < Date: Mon, 20 Apr 2015 10:20:44 -0700 Subject: [PATCH 02/17] Relax pyroma pinning --- tox.ini | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 66cdf093f..2d3d010ff 100644 --- a/tox.ini +++ b/tox.ini @@ -19,12 +19,10 @@ deps = pyflakes==0.8.1 check-manifest==0.21 pip-tools==0.3.4 - pyroma==1.6 + pyroma>=1.6 # <1.6 had bogus return values. commands = pyflakes OpenSSL check-manifest pip-review - # Work around a bug in pyroma where it returns 1 when it should - # return 0, causing tox to believe it failed. - # https://bitbucket.org/regebro/pyroma/issue/18 - sh -c < Date: Mon, 20 Apr 2015 10:21:07 -0700 Subject: [PATCH 03/17] Unpin pip-tools --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2d3d010ff..27c033db3 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ commands = deps = pyflakes==0.8.1 check-manifest==0.21 - pip-tools==0.3.4 + pip-tools pyroma>=1.6 # <1.6 had bogus return values. commands = pyflakes OpenSSL From 07dd7ce4a5d9e98288173c2e1731a9c322d0ac1f Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Mon, 20 Apr 2015 10:25:52 -0700 Subject: [PATCH 04/17] unpin check-manifest --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 27c033db3..34fb5e5d8 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ commands = [testenv:meta] deps = pyflakes==0.8.1 - check-manifest==0.21 + check-manifest pip-tools pyroma>=1.6 # <1.6 had bogus return values. commands = From 0fd8679f172fabfc054544dc8a6e4b0be8771717 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Mon, 20 Apr 2015 10:26:00 -0700 Subject: [PATCH 05/17] pyroma should look at current directory --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 34fb5e5d8..770a99ae8 100644 --- a/tox.ini +++ b/tox.ini @@ -24,5 +24,5 @@ commands = pyflakes OpenSSL check-manifest pip-review - pyroma + pyroma -d . From f7e552d0224e7bd904923d1b32a93356db105102 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Mon, 20 Apr 2015 10:26:14 -0700 Subject: [PATCH 06/17] Unpin pyflakes --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 770a99ae8..8eb69107e 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ commands = [testenv:meta] deps = - pyflakes==0.8.1 + pyflakes check-manifest pip-tools pyroma>=1.6 # <1.6 had bogus return values. From 4f6939cb3afee871921c97bd81eefdca93a637ec Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Wed, 13 May 2015 08:06:24 -0700 Subject: [PATCH 07/17] check-manifest was added already --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index ebf598ec3..23ebaf66a 100644 --- a/tox.ini +++ b/tox.ini @@ -19,12 +19,10 @@ commands = [testenv:meta] deps = pyflakes - check-manifest pip-tools pyroma>=1.6 # <1.6 had bogus return values. commands = pyflakes OpenSSL - check-manifest pip-review pyroma -d . From 8e47dfd79cf9f7dcf6585f4cde8773b008e1cf46 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Wed, 13 May 2015 08:06:40 -0700 Subject: [PATCH 08/17] Kill pip-tools & pip-review --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index 23ebaf66a..d7c3fc058 100644 --- a/tox.ini +++ b/tox.ini @@ -19,11 +19,9 @@ commands = [testenv:meta] deps = pyflakes - pip-tools pyroma>=1.6 # <1.6 had bogus return values. commands = pyflakes OpenSSL - pip-review pyroma -d . [testenv:pypi-readme] From 197956bcd9b9bcde3e9141e8c5d12d9573b3976d Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Wed, 13 May 2015 08:07:01 -0700 Subject: [PATCH 09/17] Given current features, lint > meta --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index d7c3fc058..cbdf5894d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,meta +envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,lint [testenv] deps = @@ -16,7 +16,7 @@ commands = coverage run --branch --source=OpenSSL setup.py test coverage report -m -[testenv:meta] +[testenv:lint] deps = pyflakes pyroma>=1.6 # <1.6 had bogus return values. From 5ffdcf56c9034556c9eda107dffbce365d41c699 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Wed, 13 May 2015 08:10:24 -0700 Subject: [PATCH 10/17] Allow lint failure on travis --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0354895b8..a1c97652a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,11 +47,14 @@ matrix: - python: "2.7" env: TOXENV=pypi-readme + - python: "2.7" + env: TOXENV=lint # Let the cryptography master builds fail because they might be triggered by # cryptography changes beyond our control. # Also allow OS X and 0.9.8 to fail at the moment while we fix these new # build configurations. + # Also allow lint to fail while we fix existing lint. allow_failures: - language: generic os: osx @@ -62,6 +65,7 @@ matrix: - env: TOXENV=py34-cryptographyMaster - env: TOXENV=pypy-cryptographyMaster - env: OPENSSL=0.9.8 TOXENV=py27 + - env: TOXENV=lint install: - | From ca1842f2a0971ffef06b8ea699f4b42e55d142a8 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Thu, 14 May 2015 13:29:31 -0700 Subject: [PATCH 11/17] Separate lint envs --- .travis.yml | 10 +++++++--- tox.ini | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index cc63957c0..c75c65b28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,10 @@ matrix: env: TOXENV=pypi-readme - python: "2.7" - env: TOXENV=lint + env: TOXENV=pyflakes + + - python: "2.7" + env: TOXENV=pyroma # Let the cryptography master builds fail because they might be triggered by # cryptography changes beyond our control. @@ -71,8 +74,9 @@ matrix: - env: TOXENV=py34-cryptographyMaster - env: TOXENV=pypy-cryptographyMaster - env: OPENSSL=0.9.8 TOXENV=py27 - - env: TOXENV=lint - + - env: TOXENV=pyflakes + - env: TOXENV=pyroma + install: - | if [[ "$(uname -s)" == 'Darwin' ]]; then diff --git a/tox.ini b/tox.ini index 5d755b8bd..2164039af 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,lint +envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,pyflakes,pyroma [testenv] whitelist_externals = @@ -20,12 +20,16 @@ commands = coverage run --branch --source=OpenSSL setup.py test coverage report -m -[testenv:lint] +[testenv:pyflakes] deps = pyflakes - pyroma>=1.6 # <1.6 had bogus return values. commands = pyflakes OpenSSL + +[testenv:pyroma] +deps = + pyroma>=1.6 # <1.6 had bogus return values. +commands = pyroma -d . [testenv:pypi-readme] From c9159754757765e10ea4b46f9348bd6e6c9c6e13 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Thu, 14 May 2015 13:30:19 -0700 Subject: [PATCH 12/17] Whitespace cleanup --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c75c65b28..2e31ac135 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,9 +55,6 @@ matrix: - python: "2.7" env: TOXENV=pyflakes - - - python: "2.7" - env: TOXENV=pyroma # Let the cryptography master builds fail because they might be triggered by # cryptography changes beyond our control. @@ -76,7 +73,7 @@ matrix: - env: OPENSSL=0.9.8 TOXENV=py27 - env: TOXENV=pyflakes - env: TOXENV=pyroma - + install: - | if [[ "$(uname -s)" == 'Darwin' ]]; then From dde3a8b8997046a567d66cc8e5893c7e208b10ee Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Fri, 15 May 2015 09:48:30 -0700 Subject: [PATCH 13/17] Oops, forgot to add pyroma to travis.yml Thanks @hynek! --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2e31ac135..b9f0b0e0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,9 @@ matrix: - python: "2.7" env: TOXENV=pyflakes + - python: "2.7" + env: TOXENV=pyroma + # Let the cryptography master builds fail because they might be triggered by # cryptography changes beyond our control. # Also allow OS X and 0.9.8 to fail at the moment while we fix these new From 8aea694f27a319fed4aaa3cea03d1b9dc18ffe33 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Mon, 18 May 2015 10:55:33 -0700 Subject: [PATCH 14/17] pyflakes -> flake8 --- .travis.yml | 4 ++-- tox.ini | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9f0b0e0f..52ba39caf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,7 @@ matrix: env: TOXENV=pypi-readme - python: "2.7" - env: TOXENV=pyflakes + env: TOXENV=flake8 - python: "2.7" env: TOXENV=pyroma @@ -74,7 +74,7 @@ matrix: - env: TOXENV=py34-cryptographyMaster - env: TOXENV=pypy-cryptographyMaster - env: OPENSSL=0.9.8 TOXENV=py27 - - env: TOXENV=pyflakes + - env: TOXENV=flake8 - env: TOXENV=pyroma install: diff --git a/tox.ini b/tox.ini index 2164039af..a2b1d728c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,pyflakes,pyroma +envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,flake8,pyroma [testenv] whitelist_externals = @@ -20,11 +20,11 @@ commands = coverage run --branch --source=OpenSSL setup.py test coverage report -m -[testenv:pyflakes] +[testenv:flake8] deps = - pyflakes + flake8 commands = - pyflakes OpenSSL + flake8 OpenSSL [testenv:pyroma] deps = From aba1bdb86cd0cc2de259a7e4d5aea45730ea2226 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Mon, 18 May 2015 10:56:00 -0700 Subject: [PATCH 15/17] pyroma should not be allowed to fail --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 52ba39caf..1924463f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,7 +75,6 @@ matrix: - env: TOXENV=pypy-cryptographyMaster - env: OPENSSL=0.9.8 TOXENV=py27 - env: TOXENV=flake8 - - env: TOXENV=pyroma install: - | From 2513adf5302de8cbc5095f13d1cfe770eaefddf5 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Mon, 18 May 2015 11:04:16 -0700 Subject: [PATCH 16/17] Long lines are fine --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index ec1218d9d..1cf94e9f3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,6 @@ build-requires = lynx openssl-devel python-devel python-sphinx group = Development/Libraries build_script = rpm/build_script doc-files = doc/_build/html + +[flake8] +ignore = 303 From 98316d77951dd908aece2c0ecb73844d489e0b03 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.io> Date: Tue, 19 May 2015 09:29:10 -0700 Subject: [PATCH 17/17] ENOTANERROR --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1cf94e9f3..a22d598cb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,4 +13,4 @@ build_script = rpm/build_script doc-files = doc/_build/html [flake8] -ignore = 303 +ignore = E303