[tox]
# note that tox expects interpreters to be found at C:\PythonXY,
# with XY being python version ("27" or "34") for instance
envlist = py{27,34}-pyqt4, py34-pyqt5, py{26,27,32,33,34}-pyside, docs


[testenv]
deps=pytest
    py{26,27,32,33,34}-pyside: pyside
commands=
    pyqt5: {envpython} scripts/link_pyqt.py --tox {envdir} 5
    pyqt4: {envpython} scripts/link_pyqt.py --tox {envdir} 4
    {envpython} -m py.test {posargs}
setenv=
    pyside: PYTEST_QT_API=pyside
    pyqt4: PYTEST_QT_API=pyqt4
    pyqt5: PYTEST_QT_API=pyqt5
    pyqt5: QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
passenv=DISPLAY XAUTHORITY

[testenv:docs]
basepython=python2.7
deps=pytest
    sphinx
changedir=docs
setenv=
    READTHEDOCS=True
commands=sphinx-build -q -E -W -b html . _build


[tox]
# note that tox expects interpreters to be found at C:\PythonXY,
# with XY being python version ("27" or "34") for instance
envlist = py{27,34}-pyqt4, py34-pyqt5, py{26,27,32,33,34}-pyside, docs

[testenv]
deps=pytest
    py{26,27,32,33,34}-pyside: pyside
commands=
    pyqt5: {envpython} scripts/link_pyqt.py --tox {envdir} 5
    pyqt4: {envpython} scripts/link_pyqt.py --tox {envdir} 4
    {envpython} -m pytest {posargs}
setenv=
    pyside: PYTEST_QT_API=pyside
    pyqt4: PYTEST_QT_API=pyqt4
    pyqt5: PYTEST_QT_API=pyqt5
    pyqt5: QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
passenv=DISPLAY XAUTHORITY

[testenv:docs]
basepython=python2.7
deps=pytest
    sphinx
changedir=docs
setenv=
    READTHEDOCS=True
commands=sphinx-build -q -E -W -b html . _build


Fix pytest invocation in py33: use "python -m pytest" instead of "python -m py.test"
Fix pytest invocation in py33: use "python -m pytest" instead of "python -m py.test"
