fonttools/tox.ini
Cosimo Lupo 61ab1e7f6d
build sdist/wheel only once for both Github and PyPI
This makes sure we upload the same files to Github Releases and PyPI.

Currently we were building them twice, with the risk of different files
being uploaded to the two repositories.
2016-12-26 19:36:08 +00:00

67 lines
1.9 KiB
INI

[tox]
envlist = py{27,35,36}-cov, htmlcov
[testenv]
basepython =
py27: {env:TOXPYTHON:python2.7}
pypy: {env:TOXPYTHON:pypy}
py34: {env:TOXPYTHON:python3.4}
py35: {env:TOXPYTHON:python3.5}
py36: {env:TOXPYTHON:python3.6}
deps =
# we install coverage from source until 4.3 is released, because of this:
# https://bitbucket.org/ned/coveragepy/pull-requests/118/check-source-isdir-not-just-exists-there/diff
cov: hg+https://bitbucket.org/ned/coveragepy#egg=coverage
pytest
-rrequirements.txt
install_command =
pip install -v {opts} {packages}
commands =
# run the test suite against the package installed inside tox env.
# We use parallel mode and then combine later so that coverage.py will take
# paths like .tox/py36/lib/python3.6/site-packages/fontTools and collapse
# them into Lib/fontTools.
cov: coverage run --parallel-mode -m pytest {posargs:--pyargs fontTools}
nocov: pytest {posargs:--pyargs fontTools}
[testenv:htmlcov]
basepython = {env:TOXPYTHON:python3.5}
deps =
hg+https://bitbucket.org/ned/coveragepy#egg=coverage
skip_install = true
commands =
coverage combine
coverage html
[testenv:codecov]
passenv = *
basepython = {env:TOXPYTHON:python}
deps =
hg+https://bitbucket.org/ned/coveragepy#egg=coverage
codecov
skip_install = true
ignore_outcome = true
commands =
coverage combine
codecov --env TOXENV
[testenv:bdist]
basepython = {env:TOXPYTHON:python3.5}
deps =
setuptools
wheel
skip_install = true
install_command =
# make sure we use the latest setuptools and wheel
pip install --upgrade {opts} {packages}
whitelist_externals =
rm
commands =
# clean up build/ and dist/ folders
rm -rf {toxinidir}/dist
python setup.py clean --all
# build sdist
python setup.py sdist --dist-dir {toxinidir}/dist
# build wheel from sdist
pip wheel -v --no-deps --no-index --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist fonttools