From df0f2b9c5232fa73f83951327ce7142a7b79b690 Mon Sep 17 00:00:00 2001 From: Joel Crocker Date: Tue, 17 Jun 2014 12:01:14 -0400 Subject: [PATCH] Updates django_manage so it populates VIRTUAL_ENV Virtualenv's activate script sets the VIRTUAL_ENV environment variable to the path of the virtualenv. Checking this variable is a reasonably common way to verify that execution is happening in a virtualenv. It would be convenient if this module's virtualenv handling set this environment variable. --- web_infrastructure/django_manage | 1 + 1 file changed, 1 insertion(+) diff --git a/web_infrastructure/django_manage b/web_infrastructure/django_manage index 246b9d9e3dc..580cc63c2dd 100644 --- a/web_infrastructure/django_manage +++ b/web_infrastructure/django_manage @@ -144,6 +144,7 @@ def _ensure_virtualenv(module): _fail(module, vcmd, out_venv, err_venv) os.environ["PATH"] = "%s:%s" % (vbin, os.environ["PATH"]) + os.environ["VIRTUAL_ENV"] = venv_param def createcachetable_filter_output(line): return "Already exists" not in line