Don't consider venv as externally managed#999
Conversation
89ec6fa to
ddd5ba0
Compare
nuclearsandwich
left a comment
There was a problem hiding this comment.
Thanks for the PR. Since you contributed a test for this function in #1000 is it worth rebasing now that it has merged and covering the virtualenv case in the test?
|
|
||
|
|
||
| def in_virtual_environment(): | ||
| return sys.prefix != sys.base_prefix |
There was a problem hiding this comment.
Do you know if this is a sufficiently generic way to detect virtual environments including those created by other tools like pipenv, uv, etc?
There was a problem hiding this comment.
Great question! I believe so, its from this section docs.python.org
I've used this with venv and uv
ddd5ba0 to
5ca57d2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #999 +/- ##
==========================================
+ Coverage 71.76% 72.10% +0.34%
==========================================
Files 44 44
Lines 3488 3492 +4
Branches 686 687 +1
==========================================
+ Hits 2503 2518 +15
+ Misses 808 796 -12
- Partials 177 178 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cool, I rebased and added a test in there |
Allow installation into virtual environments without requiring
--break-system-packages