• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[tox]
2minversion = 3.0
3envlist = mypy, py3{6,7,8,9}-cov, htmlcov
4skip_missing_interpreters=true
5
6[testenv]
7setenv =
8    cy: FONTTOOLS_WITH_CYTHON=1
9# use 'download = true' to have tox install the latest pip inside the virtualenv.
10# We need this to be able to install skia-pathops on Linux, which uses a
11# relatively recent 'manylinux2014' platform tag.
12# https://github.com/tox-dev/tox/issues/791#issuecomment-518713438
13download = true
14deps =
15    cov: coverage>=4.3
16    pytest
17    pytest-randomly
18    -rrequirements.txt
19    !nolxml: lxml==4.6.1
20extras =
21    ufo
22    woff
23    unicode
24    interpolatable
25    !nolxml: lxml
26commands =
27    cy: python -c "from fontTools.cu2qu.cu2qu import COMPILED; assert COMPILED"
28    !cy: python -c "from fontTools.cu2qu.cu2qu import COMPILED; assert not COMPILED"
29    # test with or without coverage, passing extra positonal args to pytest
30    cov: coverage run --parallel-mode -m pytest {posargs}
31    !cov: pytest {posargs:Tests fontTools}
32
33[testenv:htmlcov]
34deps =
35    coverage>=4.3
36skip_install = true
37commands =
38    coverage combine
39    coverage html
40
41[testenv:mypy]
42deps =
43    -r dev-requirements.txt
44skip_install = true
45commands =
46    mypy
47
48[testenv:codecov]
49passenv = *
50deps =
51    coverage>=4.3
52    codecov
53skip_install = true
54ignore_outcome = true
55commands =
56    coverage combine
57    codecov --env TOXENV
58
59[testenv:package_readme]
60description = check that the long description is valid (need for PyPi)
61deps = twine >= 1.12.1
62       pip >= 18.0.0
63skip_install = true
64extras =
65commands = pip wheel -w {envtmpdir}/build --no-deps .
66           twine check {envtmpdir}/build/*
67
68[testenv:bdist]
69deps =
70    setuptools
71    wheel
72skip_install = true
73install_command =
74    # make sure we use the latest setuptools and wheel
75    pip install --upgrade {opts} {packages}
76whitelist_externals =
77    rm
78commands =
79    # clean up build/ and dist/ folders
80    python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
81    python setup.py clean --all
82    # build sdist
83    python setup.py sdist --dist-dir {toxinidir}/dist
84    # build wheel from sdist
85    pip wheel -v --no-deps --no-index --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist fonttools
86
87[testenv:pypi]
88deps =
89    {[testenv:bdist]deps}
90    twine
91skip_install = true
92passenv = TWINE_USERNAME TWINE_PASSWORD
93commands =
94    {[testenv:bdist]commands}
95    twine upload dist/*.whl dist/*.zip
96