-
-
Notifications
You must be signed in to change notification settings - Fork 529
[testenv]
install_command
is also used for provision environment
#2428
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Thanks for your detailed report. Would you be so kind and split this one into this one into four separate issues/questions? It would be much easier to handle for us.
Again, thanks again for your report! |
Points 1, 2, 3 done. As for 4, the difference between examples 2 and 3 is that 2 says |
This is by design and in some cases expected (e.g. if you use |
Let's quickly talk about that. I do think it is a bit surprising, that setting an install command for a testenv, which in my eyes is a subordinate thing to the But I think using a custom install command + the need to provision tox is a rare condition, otherwise this would have been reported much earlier. So I think we can keep it that way, but we should document it.
I think the best and most pragmatic place for documenting this "kinda" surprising behavior is the a la ... "Please note that the install_command will also be used when provisioning tox". I would possible also mention it both for https://tox.wiki/en/latest/config.html#conf-minversion and https://tox.wiki/en/latest/config.html#conf-requires - that is some kind of duplication, but I think this is necessary and we do that duplication already for the I would not create a dedicated documentation for this. |
I personally don't find it surprising, but expected 😆 and while explicitly not documented is very much implied. Also changing it would be troublesome as would be breaking change. |
Funnily, one of the reasons I ran into this issue was because I have an |
But it could be the other way around too 🤔 That being said |
But if it's the other way, I still have the same issue don't I? ...wait, |
Indeed. You can achieve most what you want for pip with env vars. And for other you're better off with custom plugin. |
I believe this is officially fixed with #2865 |
From #2427. If I specify a high
minversion
orrequires
, a provision environment is created. Apparently, it is usinginstall_command
from[testenv]
section. Is this right? I thought thattestenv
means test environment and will not be used for anything else.If this is correct behavior, perhaps document it? Also document the way to make provision environment not use test environment. Apparently, this works:
Moved to discussions
P.S. Why is it necessary to specify the full env name in a section? As in, why require this:
[testenv:my-cool-env]
but disallow this:[testenv:cool]
or[testenv:!.tox]
?Moved to another issue
Also, documentation for
install_command
says,I don't think this is correct? Using this configuration, and running with
-vvvr
, I only see the first install command being executed:If
install_command
only accepts one command, perhaps fail if there are many? And the documentation shouldn't say it accepts commands?This should probably be elsewhere
Finally, I want to note that this is not an error:And this is also not an error:
But this is fails:
The text was updated successfully, but these errors were encountered: