Read $PYTHON in every tox.ini environment

See #2341
This commit is contained in:
Florian Bruhin 2017-12-04 06:45:47 +01:00
parent 2c2d7fe734
commit 7ef64c0f87
2 changed files with 12 additions and 31 deletions

View File

@ -379,8 +379,8 @@ local Qt install instead of installing PyQt in the virtualenv. However, unless
you have a new QtWebKit or QtWebEngine available, qutebrowser will not work. It you have a new QtWebKit or QtWebEngine available, qutebrowser will not work. It
also typically means you'll be using an older release of QtWebEngine. also typically means you'll be using an older release of QtWebEngine.
On Windows, run `tox -e 'mkvenv-win' instead, however make sure that ONLY On Windows, run `set PYTHON=C:\path\to\python.exe` (CMD) or ``$Env:PYTHON =
Python3 is in your PATH before running tox. "..."` (Powershell) first.
Creating a wrapper script Creating a wrapper script
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~

39
tox.ini
View File

@ -35,16 +35,7 @@ commands =
# other envs # other envs
[testenv:mkvenv] [testenv:mkvenv]
basepython = python3 basepython = {env:PYTHON:python3}
commands = {envpython} scripts/link_pyqt.py --tox {envdir}
envdir = {toxinidir}/.venv
usedevelop = true
deps =
-r{toxinidir}/requirements.txt
# This is used for Windows, since binary name is different
[testenv:mkvenv-win]
basepython = python.exe
commands = {envpython} scripts/link_pyqt.py --tox {envdir} commands = {envpython} scripts/link_pyqt.py --tox {envdir}
envdir = {toxinidir}/.venv envdir = {toxinidir}/.venv
usedevelop = true usedevelop = true
@ -61,7 +52,7 @@ deps = {[testenv:mkvenv]deps}
# Virtualenv with PyQt5 from PyPI # Virtualenv with PyQt5 from PyPI
[testenv:mkvenv-pypi] [testenv:mkvenv-pypi]
basepython = python3 basepython = {env:PYTHON:python3}
envdir = {toxinidir}/.venv envdir = {toxinidir}/.venv
commands = {envpython} -c "" commands = {envpython} -c ""
usedevelop = true usedevelop = true
@ -69,19 +60,9 @@ deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-pyqt.txt -r{toxinidir}/misc/requirements/requirements-pyqt.txt
# This is used for Windows, since binary name is different
[testenv:mkvenv-win-pypi]
basepython = python.exe
commands = {envpython} -c ""
envdir = {toxinidir}/.venv
usedevelop = true
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
[testenv:misc] [testenv:misc]
ignore_errors = true ignore_errors = true
basepython = python3 basepython = {env:PYTHON:python3}
# For global .gitignore files # For global .gitignore files
passenv = HOME passenv = HOME
deps = deps =
@ -91,7 +72,7 @@ commands =
{envpython} scripts/dev/misc_checks.py spelling {envpython} scripts/dev/misc_checks.py spelling
[testenv:vulture] [testenv:vulture]
basepython = python3 basepython = {env:PYTHON:python3}
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-vulture.txt -r{toxinidir}/misc/requirements/requirements-vulture.txt
@ -101,7 +82,7 @@ commands =
{envpython} scripts/dev/run_vulture.py {envpython} scripts/dev/run_vulture.py
[testenv:vulture-pyqtlink] [testenv:vulture-pyqtlink]
basepython = python3 basepython = {env:PYTHON:python3}
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-vulture.txt -r{toxinidir}/misc/requirements/requirements-vulture.txt
@ -137,7 +118,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs} {envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs}
[testenv:pylint-master] [testenv:pylint-master]
basepython = python3 basepython = {env:PYTHON:python3}
passenv = {[testenv:pylint]passenv} passenv = {[testenv:pylint]passenv}
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@ -149,7 +130,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py --output-format=colorized --reports=no {posargs} {envpython} scripts/dev/run_pylint_on_tests.py --output-format=colorized --reports=no {posargs}
[testenv:flake8] [testenv:flake8]
basepython = python3 basepython = {env:PYTHON:python3}
passenv = passenv =
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@ -158,7 +139,7 @@ commands =
{envpython} -m flake8 {posargs:qutebrowser tests scripts} {envpython} -m flake8 {posargs:qutebrowser tests scripts}
[testenv:pyroma] [testenv:pyroma]
basepython = python3 basepython = {env:PYTHON:python3}
passenv = passenv =
deps = deps =
-r{toxinidir}/misc/requirements/requirements-pyroma.txt -r{toxinidir}/misc/requirements/requirements-pyroma.txt
@ -166,7 +147,7 @@ commands =
{envdir}/bin/pyroma . {envdir}/bin/pyroma .
[testenv:check-manifest] [testenv:check-manifest]
basepython = python3 basepython = {env:PYTHON:python3}
passenv = passenv =
deps = deps =
-r{toxinidir}/misc/requirements/requirements-check-manifest.txt -r{toxinidir}/misc/requirements/requirements-check-manifest.txt
@ -174,7 +155,7 @@ commands =
{envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__' {envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__'
[testenv:docs] [testenv:docs]
basepython = python3 basepython = {env:PYTHON:python3}
whitelist_externals = git whitelist_externals = git
passenv = TRAVIS TRAVIS_PULL_REQUEST passenv = TRAVIS TRAVIS_PULL_REQUEST
deps = deps =