Issue #87 resolved

Tox obeys the VIRTUALENV_PYTHON environment variable if set

Mathieu Agopian avatarMathieu Agopian created an issue

This means that if somebody is settings this variable in his .bashrc file for example, in order to have his own manually created virtualenvs use a specific version of python by default (say python2.7), tox will create all venvs with the same python interpreter, whatever the envlist.

I can see three solutions to this:

  • don't do anything: maybe add a FAQ entry or note somewhere in the doc or in a troubleshooting session explaining this behaviour
  • unset the environment variable before creating the virtualenvs
  • create virtualenvs using the --python option and pass it the env (this way the VIRTUALENV_PYTHON isn't used)

I'd go for the third option, thoughts?

Comments (4)

  1. holger krekel

    tox should offer more controls of environment variables. I think it's OK to just unset the environment variable during the run. Are you up for a patch with test? There already is a var (PYTHONDONTWRITEBYTECODE or some such) which is treated this way.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.