You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nox has sessions that create virtualenvs, but nox itself executes using the environment available to the system. It would be nice if we could have as predictable an environment for the nox buildscript as we have for each session.
Describe the solution you'd like
Have a second file, noxfile-settings.py that nox executes if present to create an environment for noxfile.py to run in. The contents of the file might look something like this:
from nox.settings import noxfile_session
noxfile_settings.install("GitPython==3.1.14")
Then, in noxfile.py, a user can have a script that calls from git import Repo and feel confident that they are using the same version of GitPython as other developers.
Note: The settings.gradle files and buildscript { ... } blocks from Gradle are examples of another build system doing this kind of thing.
Describe alternatives you've considered
As far as I know there are no workarounds or allowances for this.
The text was updated successfully, but these errors were encountered:
I'd probably put something like this in a non-Python file, say pyproject.toml under [tool.nox] requires=["GitPython==3.1.14"], etc. Sounds like it would be a rather large change, though, since nox would need to run nox in an venv. You'd probably want to control/customize that venv, etc...
How would this feature be useful?
Nox has sessions that create virtualenvs, but nox itself executes using the environment available to the system. It would be nice if we could have as predictable an environment for the nox buildscript as we have for each session.
Describe the solution you'd like
Have a second file,
noxfile-settings.py
that nox executes if present to create an environment fornoxfile.py
to run in. The contents of the file might look something like this:Then, in
noxfile.py
, a user can have a script that callsfrom git import Repo
and feel confident that they are using the same version of GitPython as other developers.Note: The
settings.gradle
files andbuildscript { ... }
blocks from Gradle are examples of another build system doing this kind of thing.Describe alternatives you've considered
As far as I know there are no workarounds or allowances for this.
The text was updated successfully, but these errors were encountered: