Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
force recreation of venv if it is not sane (#286) #1797
With this PR a virtual environment is recreated if it's not sane, meaning the python and pip executable is not found within the venv path.
I'm not sure how to write a test for it. If it's necessary, please give me a hint :)
Pull Request Check List
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!
sdispater left a comment
We might go into a loop here since there is no guarantee that recreating the virtual environment will fix the issue. If we go this route we should at least display a warning that we recreate the environment because it's invalid.
Another approach, or an addition to this PR, could be to check if the environment is valid after creating it and, if it's not, we could warn the user. A lot of cases we had here comes from the fact that Debian-based systems do not include the
I've added a more explicit warning.
I also have a variant in preparation where I check the sanity of the venv after creating this. But I have a problem to pass the tests in