# HG changeset patch # User ymh # Date 1304633727 -7200 # Node ID ca1b62310139cc04829be2fcdb400d1518415db4 # Parent bc9813ac0dd9ca568b4a0cb83a3e2bd34e649f6e new platform version. improve wsgi diff -r bc9813ac0dd9 -r ca1b62310139 virtualenv/res/src/ldt-0.6.tar.gz Binary file virtualenv/res/src/ldt-0.6.tar.gz has changed diff -r bc9813ac0dd9 -r ca1b62310139 virtualenv/res/src/ldt-0.7.tar.gz Binary file virtualenv/res/src/ldt-0.7.tar.gz has changed diff -r bc9813ac0dd9 -r ca1b62310139 web/blinkster/__init__.py --- a/web/blinkster/__init__.py Wed May 04 16:58:20 2011 +0200 +++ b/web/blinkster/__init__.py Fri May 06 00:15:27 2011 +0200 @@ -1,3 +1,3 @@ -VERSION = (0, 22) +VERSION = (0, 23) VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION))) diff -r bc9813ac0dd9 -r ca1b62310139 web/blinkster/modwsgi.wsgi --- a/web/blinkster/modwsgi.wsgi Wed May 04 16:58:20 2011 +0200 +++ b/web/blinkster/modwsgi.wsgi Fri May 06 00:15:27 2011 +0200 @@ -1,21 +1,26 @@ import os, sys, site def application(environ, start_response): - os.environ['DJANGO_SETTINGS_MODULE'] = environ['DJANGO_SETTINGS_MODULE'] - - prev_sys_path = list(sys.path) - - sys.path.append(environ['PROJECT_PATH']) - for path in environ.get('PYTHON_PATH',"").split(os.pathsep): - if path: - site.addsitedir(path) - - new_sys_path = [] - for item in list(sys.path): - if item not in prev_sys_path: - new_sys_path.append(item) - sys.path.remove(item) - sys.path[:0] = new_sys_path + + global g_env_set + + if 'g_env_set' not in globals() or not g_env_set: + os.environ['DJANGO_SETTINGS_MODULE'] = environ['DJANGO_SETTINGS_MODULE'] + + prev_sys_path = list(sys.path) + + sys.path.append(environ['PROJECT_PATH']) + for path in environ.get('PYTHON_PATH',"").split(os.pathsep): + if path: + site.addsitedir(path) + + new_sys_path = [] + for item in list(sys.path): + if item not in prev_sys_path and item not in new_sys_path: + new_sys_path.append(item) + sys.path.remove(item) + sys.path[:0] = new_sys_path + g_env_set = True import django.core.handlers.wsgi