feat: Enable the python module in virtual envs (#584)

This will enable the python module when a virtual environment has been
activated, this is detected via the `VIRTUAL_ENV` env var.
This commit is contained in:
Thomas O'Donnell
2019-11-02 12:10:21 +01:00
committed by Matan Kushner
parent fa1267f12f
commit 42f6868e3f
3 changed files with 21 additions and 1 deletions
+3 -1
View File
@@ -27,7 +27,9 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
.set_extensions(&["py"])
.is_match();
if !is_py_project {
let is_venv = env::var("VIRTUAL_ENV").ok().is_some();
if !is_py_project && !is_venv {
return None;
}