Permalink
Browse files

bug 1137668, follow-up to add virtualenv/bin to PATH, to pick up loca…

…l hg.
  • Loading branch information...
Pike committed Feb 15, 2017
1 parent 8f32e29 commit 737a1328285a89d595bfabb29b2b900762fbdb37
Showing with 6 additions and 0 deletions.
  1. +6 −0 wsgi/elmo.wsgi
@@ -6,6 +6,12 @@ import os
import sys
import site
# to use hglib, we need access to hg, which is in sys.prefix/bin
# in virtualenvs. Prefix our PATH with that.
# Similar to activate_this.py, too.
old_os_path = os.environ.get('PATH', '')
os.environ['PATH'] = os.path.join(sys.prefix, 'bin') + os.pathsep + old_os_path
wsgidir = os.path.dirname(__file__)
path = lambda *a: os.path.join(wsgidir, *a)
prev_sys_path = list(sys.path)

0 comments on commit 737a132

Please sign in to comment.