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