Skip to content

Commit

Permalink
Read $PYTHON in every tox.ini environment
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Dec 4, 2017
1 parent 2c2d7fe commit 7ef64c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
4 changes: 2 additions & 2 deletions doc/install.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Python3 is in your PATH before running tox.
On Windows, run `set PYTHON=C:\path\to\python.exe` (CMD) or ``$Env:PYTHON =
"..."` (Powershell) first.

Creating a wrapper script
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
39 changes: 10 additions & 29 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,7 @@ commands =
# other envs

[testenv:mkvenv]
basepython = 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
basepython = {env:PYTHON:python3}
commands = {envpython} scripts/link_pyqt.py --tox {envdir}
envdir = {toxinidir}/.venv
usedevelop = true
Expand All @@ -61,27 +52,17 @@ deps = {[testenv:mkvenv]deps}

# Virtualenv with PyQt5 from PyPI
[testenv:mkvenv-pypi]
basepython = python3
basepython = {env:PYTHON:python3}
envdir = {toxinidir}/.venv
commands = {envpython} -c ""
usedevelop = true
deps =
-r{toxinidir}/requirements.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]
ignore_errors = true
basepython = python3
basepython = {env:PYTHON:python3}
# For global .gitignore files
passenv = HOME
deps =
Expand All @@ -91,7 +72,7 @@ commands =
{envpython} scripts/dev/misc_checks.py spelling

[testenv:vulture]
basepython = python3
basepython = {env:PYTHON:python3}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-vulture.txt
Expand All @@ -101,7 +82,7 @@ commands =
{envpython} scripts/dev/run_vulture.py

[testenv:vulture-pyqtlink]
basepython = python3
basepython = {env:PYTHON:python3}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-vulture.txt
Expand Down Expand Up @@ -137,7 +118,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py {toxinidir} --output-format=colorized --reports=no {posargs}

[testenv:pylint-master]
basepython = python3
basepython = {env:PYTHON:python3}
passenv = {[testenv:pylint]passenv}
deps =
-r{toxinidir}/requirements.txt
Expand All @@ -149,7 +130,7 @@ commands =
{envpython} scripts/dev/run_pylint_on_tests.py --output-format=colorized --reports=no {posargs}

[testenv:flake8]
basepython = python3
basepython = {env:PYTHON:python3}
passenv =
deps =
-r{toxinidir}/requirements.txt
Expand All @@ -158,23 +139,23 @@ commands =
{envpython} -m flake8 {posargs:qutebrowser tests scripts}

[testenv:pyroma]
basepython = python3
basepython = {env:PYTHON:python3}
passenv =
deps =
-r{toxinidir}/misc/requirements/requirements-pyroma.txt
commands =
{envdir}/bin/pyroma .

[testenv:check-manifest]
basepython = python3
basepython = {env:PYTHON:python3}
passenv =
deps =
-r{toxinidir}/misc/requirements/requirements-check-manifest.txt
commands =
{envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__'

[testenv:docs]
basepython = python3
basepython = {env:PYTHON:python3}
whitelist_externals = git
passenv = TRAVIS TRAVIS_PULL_REQUEST
deps =
Expand Down

0 comments on commit 7ef64c0

Please sign in to comment.