Reputation: 1283
I'm working on getting tox
running on Windows for an open source project I'm fooling around with.
Inside tox.ini
there are a few sections that specify basepython
[testenv:pylint]
basepython = python3
ignore_errors = True
deps =
...
Unfortunately, the default installations of python just provide python.exe
in the path, so python3
is not found causing failures.
Is there a "proper way" to deal with this in tox? Is there anyway that I can provide a basepython fallback when one isn't found. I could manually copy python.exe
to python3.exe
but that could cause problem with the way tox
creates virtual environments.
Upvotes: 1
Views: 446
Reputation: 5397
I would first check if it is somewhere explained in the docs of that project how this should work on Windows. If it is not documented, I would ask the maintainer(s) of the project if and how this should work with a default installation of Windows.
If this was something that was just not yet thought of in that project (maybe because they all develop on Mac and Linux) you can figure out a solution together that works for all developers.
for example: the tox.ini could be modified like this:
[testenv:pylint]
basepython = {env:PYTHON3_PATH:python3}
ignore_errors = True
deps =
...
That way you can override the basepython if this is necessary on your system
Also see tox docs about environment variable substitution.
Upvotes: 2