From 57f2fe3d4ac16d6f754b791901a1beac4367e399 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 3 Jun 2012 04:40:27 -0400 Subject: [PATCH] Autodetect version of Python being executed --- wsgi/dispatch.wsgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wsgi/dispatch.wsgi b/wsgi/dispatch.wsgi index 68cd5368ac..3736618102 100644 --- a/wsgi/dispatch.wsgi +++ b/wsgi/dispatch.wsgi @@ -1,11 +1,11 @@ import os import sys import site +import platform sys.stdout = sys.stderr -#TODO fix properly -ve_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'lib/python2.7/site-packages')) # Change python 2.6 to the python version you are using +ve_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'lib/python%s/site-packages' % platform.python_version()[:3])) # Add the virtual Python environment site-packages directory to the path site.addsitedir(ve_path)