summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorLeif Madsen <lmadsen@redhat.com>2016-10-28 05:59:53 -0400
committerzshi <zshi@redhat.com>2016-12-13 12:48:12 +0800
commitef7fd4008481b5b98316240b0703d2c78fbd30e8 (patch)
tree54a49e56fbdacfb9eac3a6015629f58c2bbed16a /tox.ini
parenta372d5dff98c600f0318ac8e60e7db37cd47aaa8 (diff)
[WIP] Migrate to tox based environment
Migrate the custom setup.py to a more formal setup environment using tox, in the same way that OpenStack configures their projects. Adds metadata to tox.ini from the setup.py file, and breaks out the dependencies from setup.py into requirements.txt and test-requirements.txt. Executes flake8 testing for pep8 coverage. Defaults to using Python 2 for the environment. Change-Id: Ieaea7d9f3dc227febd8fb1dc9142d478ba197a92 Signed-off-by: Leif Madsen <lmadsen@redhat.com> Signed-off-by: zshi <zshi@redhat.com>
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini26
1 files changed, 26 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..12cf8e32
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,26 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = py27,pep8
+
+[testenv]
+basepython=python2
+usedevelop = True
+install_command = pip install -U {opts} {packages}
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+commands =
+ py.test --basetemp={envtmpdir} {posargs}
+setenv =
+ VIRTUAL_ENV={envdir}
+ HOME = {envtmpdir}
+ PYTHONPATH = {toxinidir}
+
+[testenv:pep8]
+deps = flake8
+commands = flake8 {toxinidir}
+
+[flake8]
+show-source = True
+ignore = E123,E125,H803
+exclude = .tox,dist,docs,.egg,build,.venv,.git