blob: b9364c0841a82b0b5421a341133809f592381847 [file] [log] [blame]
[tox]
minversion = 3.0
envlist = lint, py3{9,10,11,12,13}-cov, htmlcov
skip_missing_interpreters=true
[testenv]
setenv =
cy: FONTTOOLS_WITH_CYTHON=1
# use 'download = true' to have tox install the latest pip inside the virtualenv.
# We need this to be able to install skia-pathops on Linux, which uses a
# relatively recent 'manylinux2014' platform tag.
# https://github.com/tox-dev/tox/issues/791#issuecomment-518713438
download = true
# building lxml from source takes too long on CI, force it to download pre-compiled
# wheel or fail if none is found with --only-binary=lxml
install_command = python -m pip install --only-binary=lxml {opts} {packages}
# exclude pytest 8.0.{1,2} because our tests mysteriously fail with those
# https://github.com/fonttools/fonttools/issues/3458
deps =
cov: coverage>=4.3
pytest>=7.0.0,!=8.0.1,!=8.0.2
pytest-randomly
# add -noextra to tox -e to skip installing extras and only test the core fonttools
!noextra: -rrequirements.txt
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}
!cov: pytest {posargs:Tests fontTools}
[testenv:htmlcov]
deps =
coverage>=4.3
skip_install = true
commands =
coverage combine
coverage html
[testenv:lint]
deps =
-r dev-requirements.txt
skip_install = true
commands =
black --check --diff .
mypy
[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
uv
skip_install = true
extras =
commands =
uv build --quiet --wheel --out-dir {envtmpdir}/build
twine check {envtmpdir}/build/*
[testenv:docs]
description = Build the documentation.
deps =
-r requirements.txt
-r Doc/docs-requirements.txt
commands =
sphinx-build -W -j auto Doc/source Doc/build