Add wheel builder env.

This commit is contained in:
Adi Roiban 2016-08-21 14:12:46 +01:00
parent ec85532f0b
commit f44bcfbd23
1 changed files with 18 additions and 11 deletions

29
tox.ini
View File

@ -3,10 +3,11 @@
; The main trial based environments are defined based on a set of tags. Each
; tag will trigger a different behavior. Multiple tags can be set for the same environment:
;
; * alldeps - install all possible dependencies
; * nodeps - avoid installing any dependency,
; * alldeps - install all possible dependencies.
; * nodeps - avoid installing any dependency.
; * withcov - run the tests wrapped using the coverage.
; * nocov - run the tests directly, without using the coverage wrapper.
; * wheel - build the wheel distribution
; * posix - prepare the tests to be run in a Linux/Unix/OSX environment.
; * windows - prepare the tests to be executed under Windows.
;
@ -30,6 +31,7 @@ skip_missing_interpreters=True
toxworkdir=build/
envlist=
{py27,py33,py34,py35}-{alldeps,nodeps}-{withcov,nocov}-{posix,windows}
{py27,py35}-wheel
pyflakes,twistedchecker,apidocs,narrativedocs,topfile,manifest-checker
@ -58,6 +60,8 @@ deps =
codecov-publish: codecov
wheel: wheel
; Code quality checkers
pyflakes{,3}: pyflakes
manifest-checker: check-manifest
@ -73,16 +77,16 @@ deps =
passenv = *
setenv =
# Enable sub-processes coverage reports and store coverage reports in a
# known location.
; Enable sub-processes coverage reports and store coverage reports in a
; known location.
COVERAGE_PROCESS_START = {toxinidir}/.coveragerc
COVERAGE_FILE = {toxinidir}/.coverage
commands =
#
# Display information about Python interpreter
# which will be used in subsequent steps
#
;
; Display information about Python interpreter
; which will be used in subsequent steps
;
python -c "import sys; print(sys.prefix)"
python -c "import sys; print(sys.exec_prefix)"
python -c "import sys; print(sys.executable)"
@ -92,19 +96,22 @@ commands =
py27-{alldeps}: pip install --no-deps epydoc pydoctor
apidocs: pip install --no-deps epydoc pydoctor
# Run tests without wrapping them using coverage.
; Run tests without wrapping them using coverage.
{nocov,nomodules,tests}: python -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
# Run the tests wrapped using coverage.
; Run the tests wrapped using coverage.
{withcov,coverage}: python {toxinidir}/admin/_copy.py {toxinidir}/admin/zz_coverage.pth {envsitepackagesdir}/zz_coverage.pth
{withcov,coverage}: coverage erase
{withcov,coverage}: coverage run -p --rcfile={toxinidir}/.coveragerc -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
# Publish the coverage reports to codecov.io
; Publish the coverage reports to codecov.io
codecov-publish: coverage combine
codecov-publish: coverage xml -o coverage.xml -i
codecov-publish: codecov {env:CODECOV_OPTIONS:}
; Build in a root folder so that buildbot can pick the result
wheel: python setup.py bdist_wheel --dist-dir {toxinidir}/dist
twistedchecker: twistedchecker src/{posargs:twisted}
txchecker-travis: {toxinidir}/.travis/twistedchecker-trunk-diff.sh {posargs:twisted}