• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[tox]
2minversion = 3.0
3envlist = py{27,37}-cov, htmlcov
4
5[testenv]
6deps =
7    cov: coverage>=4.3
8    pytest
9    -rrequirements.txt
10extras =
11    ufo
12    woff
13    unicode
14    interpolatable
15    !nolxml: lxml
16commands =
17    # test with or without coverage, passing extra positonal args to pytest
18    cov: coverage run --parallel-mode -m pytest {posargs:Tests fontTools}
19    !cov: pytest {posargs:Tests fontTools}
20
21[testenv:htmlcov]
22deps =
23    coverage>=4.3
24skip_install = true
25commands =
26    coverage combine
27    coverage html
28
29[testenv:codecov]
30passenv = *
31deps =
32    coverage>=4.3
33    codecov
34skip_install = true
35ignore_outcome = true
36commands =
37    coverage combine
38    codecov --env TOXENV
39
40[testenv:package_readme]
41description = check that the long description is valid (need for PyPi)
42deps = twine >= 1.12.1
43       pip >= 18.0.0
44skip_install = true
45extras =
46commands = pip wheel -w {envtmpdir}/build --no-deps .
47           twine check {envtmpdir}/build/*
48
49[testenv:bdist]
50deps =
51    setuptools
52    wheel
53skip_install = true
54install_command =
55    # make sure we use the latest setuptools and wheel
56    pip install --upgrade {opts} {packages}
57whitelist_externals =
58    rm
59commands =
60    # clean up build/ and dist/ folders
61    python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
62    python setup.py clean --all
63    # build sdist
64    python setup.py sdist --dist-dir {toxinidir}/dist
65    # build wheel from sdist
66    pip wheel -v --no-deps --no-index --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist fonttools
67
68[testenv:pypi]
69deps =
70    {[testenv:bdist]deps}
71    twine
72skip_install = true
73passenv = TWINE_USERNAME TWINE_PASSWORD
74commands =
75    {[testenv:bdist]commands}
76    twine upload dist/*.whl dist/*.zip
77