1 [tox] 2 minversion = 3.0 3 envlist = py{27,37}-cov, htmlcov 4 5 [testenv] 6 deps = 7 cov: coverage>=4.3 8 pytest 9 -rrequirements.txt 10 extras = 11 ufo 12 woff 13 unicode 14 interpolatable 15 !nolxml: lxml 16 commands = 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] 22 deps = 23 coverage>=4.3 24 skip_install = true 25 commands = 26 coverage combine 27 coverage html 28 29 [testenv:codecov] 30 passenv = * 31 deps = 32 coverage>=4.3 33 codecov 34 skip_install = true 35 ignore_outcome = true 36 commands = 37 coverage combine 38 codecov --env TOXENV 39 40 [testenv:package_readme] 41 description = check that the long description is valid (need for PyPi) 42 deps = twine >= 1.12.1 43 pip >= 18.0.0 44 skip_install = true 45 extras = 46 commands = pip wheel -w {envtmpdir}/build --no-deps . 47 twine check {envtmpdir}/build/* 48 49 [testenv:bdist] 50 deps = 51 setuptools 52 wheel 53 skip_install = true 54 install_command = 55 # make sure we use the latest setuptools and wheel 56 pip install --upgrade {opts} {packages} 57 whitelist_externals = 58 rm 59 commands = 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] 69 deps = 70 {[testenv:bdist]deps} 71 twine 72 skip_install = true 73 passenv = TWINE_USERNAME TWINE_PASSWORD 74 commands = 75 {[testenv:bdist]commands} 76 twine upload dist/*.whl dist/*.zip 77