How can tox configuration set virtualenv discovery? #3029
-
Virtualenv discovery is the method which tox 4 uses to find python interpreters. Rye is a tool in development (probably not ready for production) which pulls and installs multiple python verions, so obviously you'd want to get it integrated with tox (gh issue @ rye). I've made a try to get tox to get python versions from Rye and "it works" (code here). I need to set A. You can set the variable explicitly on the command line import logging
import os
from tox.tox_env.register import ToxEnvRegister
from tox.plugin import impl
@impl
def tox_register_tox_env(register: ToxEnvRegister):
logging.getLogger(__name__).warning("Use virtualenv discovery = Rye")
os.environ['VIRTUALENV_DISCOVERY'] = 'rye' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You should be setting the env var via a plugin, as show in tox/tests/plugin/test_plugin.py Lines 212 to 229 in b138c5c |
Beta Was this translation helpful? Give feedback.
You should be setting the env var via a plugin, as show in
tox/tests/plugin/test_plugin.py
Lines 212 to 229 in b138c5c