Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to select whether to use tox-conda on an env by env basis #36

Open
astrofrog opened this issue Dec 17, 2019 · 5 comments
Open

Comments

@astrofrog
Copy link

It's currently possible to opt in of using tox-conda on a project by project basis, by specifying tox-conda in the requires section under [tox]. However, I would like to be able to control whether conda is used on an environment by environment basis, since I want to make sure that things work properly both with system Python and conda Python.

I think the cleanest way to do this might be to have a way to opt out of auto conda environment with a flag inside the [tox] section:

auto_use_conda = false

and then allow environments to specify:

use_conda = true

I'm happy to investigate how to code this up as a patch, but didn't want to waste time on it unless people think it would be a good idea to allow this? Just to be clear, the defaults would be as they are now, this would just be an opt-in mechanism to allow finer grained control. It would also allow projects to opt out of global enabling if a user has tox-conda installed but a project wants to guarantee conda is not used.

@saimn
Copy link

saimn commented Dec 17, 2019

Related :
drdavella/tox-conda#11
drdavella/tox-conda#12

@AntoineD
Copy link
Collaborator

@gaborbernat will tox 4 support this kind of feature? (not limited to conda only)

@gaborbernat
Copy link
Member

Yes 👍 see https://tox.readthedocs.io/en/rewrite/config.html#runner, which defaults to virtualenv but may be changed.

@abravalheri
Copy link

Hi guys, is there any example on how to use the runner option to achieve something similar to this?

I had a look on the docs, but I couldn't figure out what the value assigned to runner is...

(e.g.: is runner supposed to be the name of a CLI script that builds a virtual environment? An entry point that follows the same API as tox.tox_env.runner.RunToxEnv?)

@gaborbernat
Copy link
Member

It's an entry point 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants