[Tox] Use platform independant toxworkdir instead of PWD

The use of `{env:PWD}` is not available on Windows so switch to
`{toxworkdir}` which is the directory where virtual environments
are created and sub directories for packaging reside.
This commit is contained in:
Calum Lind 2018-05-19 21:51:24 +01:00
parent 7d120690ab
commit 8439698336

15
tox.ini
View file

@ -18,7 +18,7 @@ minversion=1.8
[testenv]
install_command = pip install --ignore-installed {opts} {packages}
passenv = DISPLAY PYTHONPATH
setenv = PYTHONPATH = {env:PWD}:
setenv = PYTHONPATH = {toxinidir}:
sitepackages = True
deps =
twisted[tls]
@ -31,7 +31,7 @@ deps =
mock
slimit
pillow
whitelist_externals = pytest
whitelist_externals = pytest bash
commands = {envpython} setup.py test
[pytest]
@ -54,21 +54,22 @@ commands = pytest -v --basetemp=_pytest_temp -s -m "gtkui" deluge/tests
commands = pytest -v --basetemp=_pytest_temp -s -m "todo" deluge/tests
[testenv:trial]
setenv = {[testenv]setenv}:{env:PWD}/deluge/tests
setenv = {[testenv]setenv}:{toxinidir}/deluge/tests
commands =
python -c "import libtorrent as lt; print lt.__version__"
python -m twisted.trial --reporter=deluge-reporter deluge.tests
[testenv:plugins]
setenv = PYTHONPATH = {env:PWD}:{env:PWD}/deluge/plugins
setenv = PYTHONPATH = {toxinidir}:{toxinidir}/deluge/plugins
whitelist_externals = bash
commands =
python setup.py build_plugins --develop --install-dir={env:PWD}/deluge/plugins/
python setup.py build_plugins --develop --install-dir={toxinidir}/deluge/plugins/
pytest -v --basetemp=_pytest_temp -s -m "not gtkui" deluge/plugins
[testenv:pluginsgtkui]
setenv = PYTHONPATH = {env:PWD}:{env:PWD}/deluge/plugins
setenv = PYTHONPATH = {toxinidir}:{toxinidir}/deluge/plugins
commands =
python setup.py build_plugins --develop --install-dir={env:PWD}/deluge/plugins/
python setup.py build_plugins --develop --install-dir={toxinidir}/deluge/plugins/
pytest -v --basetemp=_pytest_temp -s deluge/plugins
[testenv:py27]