From a54cdfb6c7576f3b4f92a7d90b849ad007630fbe Mon Sep 17 00:00:00 2001
From: Stephen Finucane <stephenfin@redhat.com>
Date: Thu, 2 May 2019 11:05:31 -0600
Subject: [PATCH] tox: Remove pecan-devNN tox targets, centralize deps

Change-Id: Ie8498b6a21143091f7514b56b059b3207945fd4f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
---
 requirements-py3.txt  |  5 ---
 test-requirements.txt |  9 +++++
 tox.ini               | 91 +++++--------------------------------------
 3 files changed, 19 insertions(+), 86 deletions(-)
 delete mode 100644 requirements-py3.txt
 create mode 100644 test-requirements.txt

diff --git a/requirements-py3.txt b/requirements-py3.txt
deleted file mode 100644
index ffb3942..0000000
--- a/requirements-py3.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-six>=1.9.0
-WebOb>=1.8.0
-simplegeneric
-pytz
-netaddr>=0.7.12
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..efc7677
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,9 @@
+transaction
+pecan
+sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
+sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
+Flask
+flask-restful
+nose
+coverage < 3.99
+webtest
diff --git a/tox.ini b/tox.ini
index 163c3fb..ba5215b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,50 +1,19 @@
 [tox]
-envlist = py27,py35,py36,pypy,coverage,pep8,pecan-dev27,pecan-dev35,pecan-dev36
-
-[common]
-testtools =
-  nose
-  coverage < 3.99
-  pbr
-  webtest
-basedeps =
-  transaction
-  pecan
-  sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7'
-  sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4'
-  Flask
-  flask-restful
+minversion = 3.1
+envlist = py27,py35,py36,pypy,coverage,pep8
+ignore_basepython_conflict = True
 
 [testenv]
+basepython = python3
 setenv =
   COVERAGE_FILE=.coverage.{envname}
-
-[testenv:pecan-dev-base]
 deps =
-  {[common]testtools}
-  transaction
-  https://github.com/pecan/pecan/zipball/master
-
-[testenv:pecan-dev27]
-basepython = python2.7
-deps = {[testenv:pecan-dev-base]deps}
+  -r test-requirements.txt
 commands =
-  {envbindir}/nosetests tests/pecantest --with-xunit --xunit-file nosetests-{envname}.xml --verbose {posargs}
-
-[testenv:pecan-dev35]
-basepython = python3.5
-deps = {[testenv:pecan-dev-base]deps}
-commands =
-  {envbindir}/nosetests tests/pecantest --with-xunit --xunit-file nosetests-{envname}.xml --verbose {posargs}
-
-[testenv:pecan-dev36]
-basepython = python3.6
-deps = {[testenv:pecan-dev-base]deps}
-commands =
-  {envbindir}/nosetests tests/pecantest --with-xunit --xunit-file nosetests-{envname}.xml --verbose {posargs}
+  {envbindir}/coverage run {envbindir}/nosetests --nologcapture --with-xunit --xunit-file nosetests-{envname}.xml wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py --verbose {posargs}
+  {envbindir}/coverage report --show-missing wsme/*.py wsme/rest/*.py wsmeext/*.py
 
 [testenv:coverage]
-basepython = python3
 deps =
   coverage < 3.99
 setenv =
@@ -56,7 +25,6 @@ commands =
   {envbindir}/coverage report --show-missing wsme/*.py wsme/protocols/*.py wsmeext/*.py
 
 [testenv:docs]
-basepython = python3
 whitelist_externals =
   rm
 deps =
@@ -66,49 +34,10 @@ commands =
   sphinx-build -W -b html doc/source doc/build/html
 
 [testenv:pep8]
-basepython = python3
 deps = flake8
-commands = flake8 wsme wsmeext setup.py
+commands =
+  flake8 wsme wsmeext setup.py
 
 [testenv:venv]
-commands = {posargs}
 usedevelop = True
-deps =
-  pbr
-  oslo.config
-  oslotest
-
-[testenv:py27]
-commands =
-  {envbindir}/coverage run {envbindir}/nosetests --nologcapture --with-xunit --xunit-file nosetests-{envname}.xml wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py --verbose {posargs}
-  {envbindir}/coverage report --show-missing wsme/*.py wsme/rest/*.py wsmeext/*.py
-deps =
-  {[common]testtools}
-  {[common]basedeps}
-basepython = python2.7
-
-[testenv:py35]
-commands =
-  {envbindir}/coverage run {envbindir}/nosetests --nologcapture --with-xunit --xunit-file nosetests-{envname}.xml wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py --verbose {posargs}
-  {envbindir}/coverage report --show-missing wsme/*.py wsme/rest/*.py wsmeext/*.py
-deps =
-  {[common]testtools}
-  {[common]basedeps}
-basepython = python3.5
-
-[testenv:py36]
-commands =
-  {envbindir}/coverage run {envbindir}/nosetests --nologcapture --with-xunit --xunit-file nosetests-{envname}.xml wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py --verbose {posargs}
-  {envbindir}/coverage report --show-missing wsme/*.py wsme/rest/*.py wsmeext/*.py
-deps =
-  {[common]testtools}
-  {[common]basedeps}
-basepython = python3.6
-
-[testenv:pypy]
-commands =
-  {envbindir}/coverage run {envbindir}/nosetests --nologcapture --with-xunit --xunit-file nosetests-{envname}.xml wsme/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py --verbose {posargs}
-  {envbindir}/coverage report --show-missing wsme/*.py wsme/rest/*.py wsmeext/*.py
-deps =
-  {[common]testtools}
-  {[common]basedeps}
+commands = {posargs}