Better support for virtual python environments #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As an amateur Python dev, I wanted to propose this PR as an alternative to handling the "externally managed environment" issue as mentioned in #66 and #67.
To me it seems inappropriate to delete a file by default without warning in Debian 12 as happens now in the master branch so I've removed that functionality and added in break_system_packages and virtualenv_site_packages as role variables which provides a workable alternative to installing packages for externally managed environments in Debian 12.
I've also added a task to install virtualenv via pip so this role can be used to create virtual environments on its own.
Also apologies to @socheatsok78 for submitting a PR for something you're also working on. Your work was helpful for thinking about this issue, I just wanted to go in a different direction with it.