-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
89 lines (82 loc) · 2.4 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
# this file is *not* meant to cover or endorse the use of tox or pytest or
# testing in general,
#
# It's meant to show the use of:
#
# - python setup.py check
# confirm required package meta-data in setup.py
# - readme_renderer (when using a ReStructuredText README)
# confirms your long_description will render correctly on PyPI.
#
# and also to help confirm pull requests to this project.
[tox]
envlist = py{36,37,38}
# Define the minimal tox version required to run;
# if the host tox is less than this the tool with create an environment and
# provision it with a tox that satisfies it under provision_tox_env.
# At least this version is needed for PEP 517/518 support.
minversion = 3.3.0
# Activate isolated build environment. tox will use a virtual environment
# to build a source distribution from the source tree. For build tools and
# arguments use the pyproject.toml file as specified in PEP-517 and PEP-518.
isolated_build = true
[testenv]
# deps =
# If your project uses README.rst, uncomment the following:
# readme_renderer
extras =
test
cli
commands =
# This repository uses a Markdown long_description, so the -r flag to
# `setup.py check` is not needed. If your project contains a README.rst,
# use `python setup.py check -m -r -s` instead.
python setup.py check -m -s
flake8 .
py.test tests
[testenv:build-test-dists]
# Test PyPI does not accept PEP 440 local versions, e.g.:
# discreetly-0.0.3.dev20+g49004ca.d20191218
# So we set SETUPTOOLS_SCM_PRETEND_VERSION and build to build/testdist
passenv = SETUPTOOLS_SCM_PRETEND_VERSION
basepython = python3
isolated_build = true
usedevelop = false
skip_install = true
deps =
pep517 >= 0.5.0
commands =
rm -rfv {toxinidir}/build/testdist/
mkdir -p {toxinidir}/build/testdist/
{envpython} -m pep517.build \
--source \
--binary \
--out-dir {toxinidir}/build/testdist/ \
{toxinidir}
whitelist_externals =
rm
mkdir
[testenv:build-dists]
basepython = python3
isolated_build = true
usedevelop = false
skip_install = true
deps =
pep517 >= 0.5.0
commands =
rm -rfv {toxinidir}/dist/
{envpython} -m pep517.build \
--source \
--binary \
--out-dir {toxinidir}/dist/ \
{toxinidir}
whitelist_externals =
rm
[flake8]
count = True
ignore = W503
exclude = .tox,*.egg,build,data,.direnv
max-complexity = 10
select = E,W,F
show-source = True
statistics = True