forked from svenevs/exhale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
90 lines (82 loc) · 2.6 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[tox]
envlist = py, flake8
# TODO: is there a way to just somehow do
# deps = sphinx if NOT env:SPHINX_VERSION
# else sphinx==SPHINX_VERSION
# ?
# I couldn't figure out how to conditionally exclude the == signs without making
# the environment variable SPHINX_VERSION='==X.Y.Z' which is ridiculous.
#
# Problem right now is I need to remember to update this variable...
[sphinx]
latest_version = 2.0.1
[breathe]
latest_version = 4.13.0.post0
[testenv]
# Required to be able to send coverage reports from Travis to codecov
passenv = PYTHONWARNINGS TOXENV CI TRAVIS TRAVIS_*
# See TODO below, skipping install since I don't know what is going on...
# usedevelop = true
skip_install = true
# TODO: having issues supporting breathe==4.12.0 and sphinx==1.8.5, on CI it
# ends up getting breathe==4.13.0.post0 somehow when using -r requirements.txt.
# Moving requirements here for the time being, will revert when 1.x is in
# progress / dependencies are changed.
deps =
sphinx=={env:SPHINX_VERSION:{[sphinx]latest_version}}
breathe=={env:BREATHE_VERSION:{[breathe]latest_version}}
bs4
lxml
six
commands =
{envpython} -m pip install -q -r requirements-dev.txt
pytest . {posargs}
{envpython} -c 'import sphinx; print("Tested against Sphinx version %s." % sphinx.__version__)'
{envpython} -c 'import breathe; print("Tested against Breathe version %s." % breathe.__version__)'
{envpython} -c 'import sys; print("Tested against Python version %d.%d.%d." % sys.version_info[0:3])'
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-docstrings
flake8-import-order
pep8-naming
flake8-colors
commands =
flake8 {posargs} setup.py testing/
# TODO: many intentional flake8 failures in exhale/
# flake8 {posargs} setup.py exhale/ testing/
[testenv:docs]
changedir = docs
deps =
-rrequirements-docs.txt
commands =
sphinx-build -W -n -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:linkcheck]
changedir = docs
deps =
-rrequirements-docs.txt
commands =
sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees . {envtmpdir}/linkcheck
[testenv:dist]
deps = readme_renderer
skip_install = true
commands =
# Checks RST for uploading to PyPi
{envpython} setup.py check -r -s
{envpython} setup.py sdist
{envpython} setup.py bdist_wheel --universal
[testenv:clean]
whitelist_externals =
find
rm
deps =
skip_install = true
commands =
rm -rf build/
rm -rf dist/
rm -rf exhale.egg-info/
rm -rf .eggs/
rm -rf pip-wheel-metadata/
find . -name "*.pyc" -exec rm -f \{\} +
find . -name "__pycache__" -type d -exec rm -rf \{\} +