Merge pull request #127 from lvh/test-metadata

Add a meta testenv for metadata: style & packaging
diff --git a/.travis.yml b/.travis.yml
index f49e780..1924463 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,11 +53,17 @@
   - python: "2.7"
     env: TOXENV=pypi-readme
 
+  - python: "2.7"
+    env: TOXENV=flake8
 
+  - 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
   # build configurations.
+  # Also allow lint to fail while we fix existing lint.
   allow_failures:
   - language: generic
     os: osx
@@ -68,6 +74,7 @@
   - env: TOXENV=py34-cryptographyMaster
   - env: TOXENV=pypy-cryptographyMaster
   - env: OPENSSL=0.9.8 TOXENV=py27
+  - env: TOXENV=flake8
 
 install:
   - |
diff --git a/setup.cfg b/setup.cfg
index ec1218d..a22d598 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -11,3 +11,6 @@
 group = Development/Libraries
 build_script = rpm/build_script
 doc-files = doc/_build/html
+
+[flake8]
+ignore = E303
diff --git a/tox.ini b/tox.ini
index a4cab37..a2b1d72 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest
+envlist = {pypy,py26,py27,py33,py34}{,-cryptographyMaster},pypi-readme,check-manifest,flake8,pyroma
 
 [testenv]
 whitelist_externals =
@@ -20,6 +20,18 @@
     coverage run --branch --source=OpenSSL setup.py test
     coverage report -m
 
+[testenv:flake8]
+deps =
+     flake8
+commands =
+     flake8 OpenSSL
+
+[testenv:pyroma]
+deps =
+     pyroma>=1.6 # <1.6 had bogus return values.
+commands =
+     pyroma -d .
+
 [testenv:pypi-readme]
 deps =
     readme