22
33# This file must be in the same dir as setup.py
44[tox]
5- envlist = py36, py37, py38, py39-dev, pypy3, mypy
5+ envlist = py36, py37, py38, py39-dev, pypy3, mypy, build
66skip_missing_interpreters = True
77requires = pip >= 19.0.0
88
99
1010[travis]
1111python =
12- 3.6: py36, mypy
13- 3.7: py37
14- 3.8: py38
15- 3.9-dev: py39-dev
16- pypy3: pypy3
12+ 3.6: py36, build, mypy
13+ 3.7: py37, build
14+ 3.8: py38, build
15+ 3.9-dev: py39-dev, build
16+ pypy3: pypy3, build
1717
1818
1919[gh-actions]
2020python =
21- 3.6: py36
22- 3.7: py37
23- 3.8: py38
24- 3.9-dev: py39-dev
25- pypy3: pypy3
26-
27-
28- [build-system]
29- requires = [
30- setuptools >= 46.1.3
31- wheel >= 0.34.2
32- ]
33- build-backend = " setuptools"
21+ 3.6: py36, build
22+ 3.7: py37, build
23+ 3.8: py38, build
24+ 3.9-dev: py39-dev, build
25+ pypy3: pypy3, build
3426
3527
3628[testenv]
@@ -44,7 +36,6 @@ commands =
4436
4537
4638
47-
4839[testenv:docs]
4940basepython = python3.8
5041changedir = {toxinidir}/doc-source
@@ -63,11 +54,15 @@ commands = bumpversion --verbose {posargs}
6354[testenv:build]
6455skip_install = true
6556changedir = {toxinidir}
66- deps = setuptools >= 46.1.3
67- pep517
68- wheel >= 0.34.2
69-
70- commands = python setup.py {posargs} sdist bdist_wheel
57+ deps =
58+ twine
59+ pep517
60+ check-wheel-contents
61+ commands =
62+ python -m pep517.build --source --binary " {toxinidir}"
63+ ; python setup.py {posargs} sdist bdist_wheel
64+ twine check dist/*
65+ check-wheel-contents dist/
7166
7267
7368[testenv:lint]
8479 flake8-docstrings
8580 git+https://github.com/domdfcoding/flake8-rst-docstrings.git
8681 flake8-builtins
82+ flake8-walrus
8783 pygments
8884 git+https://github.com/domdfcoding/flake8-quotes.git
8985commands = flake8 flake8_strftime tests
@@ -119,7 +115,6 @@ deps =
119115commands = mypy flake8_strftime tests
120116
121117
122-
123118[testenv:bandit]
124119basepython = python3.6
125120
@@ -153,9 +148,24 @@ changedir = {toxinidir}
153148commands = tox -e pyup,isort,yapf,mypy,lint {posargs}
154149
155150
151+ [testenv:coverage]
152+ basepython = python3.6
153+ skip_install = True
154+ ignore_errors = true
155+ whitelist_externals = /bin/bash
156+ changedir = {toxinidir}
157+ deps =
158+ coverage
159+ coverage_pyver_pragma
160+ commands =
161+ /bin/bash -c " rm -rf htmlcov"
162+ coverage html
163+ /bin/bash -c " DISPLAY=:0 firefox 'htmlcov/index.html'"
164+
165+
156166[flake8]
157167max-line-length = 120
158- select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E101 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 PT001 PT002 PT003 PT004 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q000 Q001 Q002 Q003 A001 A002 A003 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417
168+ select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E101 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 PT001 PT002 PT003 PT004 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q000 Q001 Q002 Q003 A001 A002 A003 ASN001 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417
159169exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py
160170rst-roles =
161171 class,
@@ -179,8 +189,6 @@ multiline-quotes = """
179189docstring-quotes = " " "
180190
181191
182-
183-
184192[mypy]
185193python_version = 3.6
186194ignore_missing_imports = True
@@ -190,3 +198,8 @@ namespace_packages = True
190198[coverage:run]
191199plugins =
192200 coverage_pyver_pragma
201+
202+
203+ [check-wheel-contents]
204+ toplevel = flake8_strftime
205+ package = flake8_strftime
0 commit comments