-
-
Notifications
You must be signed in to change notification settings - Fork 164
Allow use of venv rather than virtualenv #199
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
Comments
|
No, unfortunately we still need it to create virtual environments for 2.7
sessions.
…On Sun, May 26, 2019, 1:22 PM Santos Gallegos ***@***.***> wrote:
nox is python3 only, so I guess we can just replace virtualenv?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#199>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB5I44CA4YHTFHG5S4VEYLPXLWQLANCNFSM4HPXJLZQ>
.
|
... and there are things that only work in virtualenv (there are some nasty interactions if, for example, you create a venv from within a virtualenv). So I definitely think it's something where the user needs to be able to choose. Of course, as someone who wants to ditch Python 2.7 ASAP, my personal preference would be to go venv by default with an option to use virtualenv, but that would be backward incompatible, so I'm fine with venv being the one that needs to be opt-in. |
Thinking of future-proofing this for Session decorator wise, I think it makes the most sense to have something like: @nox.session(py="3.7", venv_backend="venv") Thoughts? |
I like the idea of having different backends, shouldn't be this a global option that could be overridden by each session? |
I think per session alone makes the most sense, but happy to hear reasoning
for another global opt.
…On Mon, May 27, 2019, 5:22 PM Santos Gallegos ***@***.***> wrote:
I like the idea of having different backends, shouldn't be this a global
option that could be overridden by each session?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#199>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB5I46AHOQDKS5JUV4JUOTPXR3MPANCNFSM4HPXJLZQ>
.
|
I'm trying to migrate pipx's test suite to nox right now and am running into this issue. The problem is the pip executable is pointing to the python nox's virtualenv session rather than one that pipx created with venv:
What is the status on adding venv support to nox? I thought I might get lucky and tried |
To my surprise, I changed
to
in |
I hacked something together, but I'll wait for #217 to land before adding the venv backend. There was some additional logic needed to find the correct python interpreter when creating a venv from within one of nox's virtualenv's. The tox-venv project served as a good template to work from. |
Just merged #217, would love to see your changes! Let me know if you need help. |
I've assigned this issue to you, @cs01, but definitely holler if you're not okay with that. |
No that's perfect. I think I am in a good spot to be assigned this since I got it working with pipx. |
How would this feature be useful?
Some projects (for example,
pipx
) have test suites that cannot run under virtualenv, but require venv. Being able to choose whether to use virtualenv or venv would allow using nox to run the test suite.Describe the solution you'd like
The simplest solution I can think of is to use a parameter to
nox.session
, something like@nox.session(stdlib_venv=True)
. But honestly, it doesn't matter much to me how it gets specified.Describe alternatives you've considered
I can't really think of a good alternative, other than "use something else" :-( Ideally,
virtualenv
andvenv
would be sufficiently compatible that it doesn't matter which you use, but that simply doesn't seem to be the case.The text was updated successfully, but these errors were encountered: