Skip to content
This repository has been archived by the owner on Feb 17, 2019. It is now read-only.

Wrap up virtual environment after creation #9

Merged
merged 2 commits into from Aug 18, 2018
Merged

Wrap up virtual environment after creation #9

merged 2 commits into from Aug 18, 2018

Conversation

Epiphane
Copy link
Contributor

This is a solution for tox-dev/tox#283 - detox does not completely wrap up the virtual environment after creating it, and keeps recreating the venv for every execution.

Native tox behavior for the skipsdist case is located at https://github.com/msabramo/tox/blob/master/tox/_cmdline.py#L444 - calling venv.finish() writes the necessary configuration so that this environment will be reused in future runs.

@Epiphane
Copy link
Contributor Author

Extra change - the return code from running detox is different than when running python -m detox. When running as a module, the return code is always successful, so raise a SystemExit in order to persist any erorrs.

@obestwalter
Copy link
Member

Hey @Epiphane thanks a lot. A moment we are busy getting the next tox release out, but I am sure we can get to this soon.

@rm-you
Copy link

rm-you commented Aug 8, 2018

This is relevant to me too -- will someone be able to get to this? It's incredibly annoying for me, as I am sometimes working on projects with very large dependency trees and not the fastest internet, and it can take a very long time to regenerate envs...

@rm-you
Copy link

rm-you commented Aug 10, 2018

For now I've cherry-picked both of these commits locally and installed that in my virtualenv. Thanks for the patches, I really hope someone can merge this soon. 👍

@obestwalter obestwalter merged commit c7957fd into tox-dev:master Aug 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants