fonttools/tox.ini
Cosimo Lupo 9690282f21
don't install lmxl when running '-nolxml' tests
in .travis/run.sh we call tox -e py-nolxml with the XML-related tests
to verify that they work despite lxml not being installed (using ElementTree
backend).
If we install lxml in requirements.txt unconditionally, then we are not
testing the absence of lxml...
2020-04-02 19:51:13 +01:00

83 lines
1.9 KiB
INI

[tox]
minversion = 3.0
envlist = py3{6,7,8}-cov, htmlcov
[testenv]
setenv =
cy: FONTTOOLS_WITH_CYTHON=1
deps =
cov: coverage>=4.3
pytest
pytest-randomly
-rrequirements.txt
!nolxml: lxml==4.5.0
extras =
ufo
woff
unicode
interpolatable
!nolxml: lxml
commands =
cy: python -c "from fontTools.cu2qu.cu2qu import COMPILED; assert COMPILED"
!cy: python -c "from fontTools.cu2qu.cu2qu import COMPILED; assert not COMPILED"
# test with or without coverage, passing extra positonal args to pytest
cov: coverage run --parallel-mode -m pytest {posargs:Tests fontTools}
!cov: pytest {posargs:Tests fontTools}
[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:package_readme]
description = check that the long description is valid (need for PyPi)
deps = twine >= 1.12.1
pip >= 18.0.0
skip_install = true
extras =
commands = pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
[testenv:bdist]
deps =
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 =
# 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