Issues

Issue #87 resolved

Tox obeys the VIRTUALENV_PYTHON environment variable if set

Mathieu 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 repo owner

    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