fonttools/tox.ini
Cosimo Lupo b1093c8ac1
tox: add extras; allow to test with/without lxml
calling 'tox -e py37-cov-nolxml' will run tests without lxml,
using built-in ElementTree library
2018-10-18 15:40:32 +01:00

72 lines
1.5 KiB
INI

[tox]
minversion = 3.0
envlist = py{27,37}-cov, htmlcov
[testenv]
deps =
cov: coverage>=4.3
pytest
-rrequirements.txt
extras =
ufo
woff
unicode
interpolatable
!nolxml: lxml
commands =
# test with or without coverage, passing extra positonal args to pytest
cov: coverage run --parallel-mode -m pytest {posargs}
nocov: pytest {posargs}
[testenv:htmlcov]
deps =
coverage>=4.3
skip_install = true
commands =
coverage combine
coverage html
[testenv:codecov]
passenv = *
deps =
coverage>=4.3
codecov
skip_install = true
ignore_outcome = true
commands =
coverage combine
codecov --env TOXENV
[testenv:bdist]
deps =
pygments
docutils
setuptools
wheel
skip_install = true
install_command =
# make sure we use the latest setuptools and wheel
pip install --upgrade {opts} {packages}
whitelist_externals =
rm
commands =
# check metadata and rst long_description
python setup.py check --restructuredtext --strict
# clean up build/ and dist/ folders
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
python setup.py clean --all
# build sdist
python setup.py sdist --dist-dir {toxinidir}/dist
# build wheel from sdist
pip wheel -v --no-deps --no-index --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist fonttools
[testenv:pypi]
deps =
{[testenv:bdist]deps}
twine
skip_install = true
passenv = TWINE_USERNAME TWINE_PASSWORD
commands =
{[testenv:bdist]commands}
twine upload dist/*.whl dist/*.zip