forked from python/importlib_metadata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
97 lines (84 loc) · 2.15 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
91
92
93
94
95
96
97
[tox]
envlist = {py27,py35,py36,py37,py38}{,-cov,-diffcov},qa,docs,perf
skip_missing_interpreters = True
minversion = 3.2
# Ensure that a late version of pip is used even on tox-venv.
requires =
tox-pip-version>=0.0.6
[testenv]
pip_version = pip
commands =
!cov,!diffcov: python -m unittest discover {posargs}
cov,diffcov: python -m coverage run {[coverage]rc} -m unittest discover {posargs}
cov,diffcov: python -m coverage combine {[coverage]rc}
cov: python -m coverage html {[coverage]rc}
cov: python -m coverage xml {[coverage]rc}
cov: python -m coverage report -m {[coverage]rc} --fail-under=100
diffcov: python -m coverage xml {[coverage]rc}
diffcov: diff-cover coverage.xml --html-report diffcov.html
diffcov: diff-cover coverage.xml --fail-under=100
usedevelop = True
passenv =
PYTHON*
LANG*
LC_*
PYV
deps =
cov,diffcov: coverage>=4.5
diffcov: diff_cover
pyfakefs
setenv =
cov: COVERAGE_PROCESS_START={[coverage]rcfile}
cov: COVERAGE_OPTIONS="-p"
cov: COVERAGE_FILE={toxinidir}/.coverage
py27: PYV=2
py35,py36,py37,py38: PYV=3
# workaround deprecation warnings in pip's vendored packages
PYTHONWARNINGS=ignore:Using or importing the ABCs:DeprecationWarning:pip._vendor
extras =
testing
[testenv:qa]
basepython = python3.7
commands =
python -m flake8 importlib_metadata
mypy importlib_metadata
deps =
mypy
flake8
flufl.flake8
extras =
[testenv:docs]
basepython = python3
commands =
sphinx-build docs build/sphinx/html
extras =
docs
[testenv:perf]
use_develop = False
deps =
ipython
commands =
python -m timeit -s 'import importlib_metadata' -- 'importlib_metadata.distribution("ipython")'
[testenv:release]
basepython = python3
deps =
twine
wheel
setuptools
keyring
setuptools_scm
passenv =
TWINE_PASSWORD
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python setup.py sdist bdist_wheel
python -m twine {posargs} upload dist/*
[coverage]
rcfile = {toxinidir}/coverage.ini
rc = --rcfile="{[coverage]rcfile}"
[flake8]
hang-closing = True
jobs = 1
max-line-length = 79
enable-extensions = U4