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

reuse_existing should check the interpreter #123

Closed
dhermes opened this issue Aug 27, 2018 · 8 comments · Fixed by #418
Closed

reuse_existing should check the interpreter #123

dhermes opened this issue Aug 27, 2018 · 8 comments · Fixed by #418

Comments

@dhermes
Copy link
Collaborator

dhermes commented Aug 27, 2018

If reuse_existing=True when creating a Virtualenv, but the interpreter has changed, then the environment should still be re-created.

@theacodes
Copy link
Collaborator

Interesting, wouldn't that change the name of the virtualenv folder?

@dhermes
Copy link
Collaborator Author

dhermes commented Aug 27, 2018

@theacodes I'm not 100% sure, but I think "not always" is the answer.

@theacodes
Copy link
Collaborator

Cool, makes sense for us to check it then.

@theacodes
Copy link
Collaborator

I'm not 100% how to do this yet. We don't ever know the full path to the interpreter, we just figure out enough info to get virtualenv to figure it out. I could try invoking the interpreter.

@dhermes
Copy link
Collaborator Author

dhermes commented Sep 15, 2018

Yes. You can get the actual interpreter via:

original = session.run("python", "-c", "import sys; print(sys.real_prefix)", silent=True)

@theacodes
Copy link
Collaborator

Invoking the interpreter doesn't quite get me any closer. We could invoke our resolved interpreter and invoke the one in the virtualenv and compare. Still not 100% sure on that.

@dhermes
Copy link
Collaborator Author

dhermes commented Sep 22, 2018

Yes that's what you want to do.

@theacodes
Copy link
Collaborator

From #231, we should also test the type of environment.

dpalmasan pushed a commit to dpalmasan/nox that referenced this issue Apr 10, 2021
dpalmasan pushed a commit to dpalmasan/nox that referenced this issue Apr 10, 2021
dpalmasan pushed a commit to dpalmasan/nox that referenced this issue Apr 10, 2021
dpalmasan pushed a commit to dpalmasan/nox that referenced this issue Apr 10, 2021
dpalmasan pushed a commit to dpalmasan/nox that referenced this issue Apr 10, 2021
dpalmasan pushed a commit to dpalmasan/nox that referenced this issue Apr 10, 2021
theacodes pushed a commit that referenced this issue Apr 24, 2021
Co-authored-by: Diego <dpalma@evernote.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants