aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2013-04-03 22:47:04 +0000
committerMichael Elkins <melkins@tislabs.com>2013-04-03 22:47:04 +0000
commitb26aaf3b46c277d485afd9fcc5c9b9ee41fa9586 (patch)
tree0156cc9305c045117cac8176b1d22fe7d4f6951e /rpkid/portal-gui
parent8eb584c27a20975ad1f66c92b7cd8ce52e129b06 (diff)
remove support for virtualenv.
closes #504 svn path=/trunk/; revision=5269
Diffstat (limited to 'rpkid/portal-gui')
-rw-r--r--rpkid/portal-gui/rpki.wsgi.in36
1 files changed, 1 insertions, 35 deletions
diff --git a/rpkid/portal-gui/rpki.wsgi.in b/rpkid/portal-gui/rpki.wsgi.in
index ac3f0186..d6b12350 100644
--- a/rpkid/portal-gui/rpki.wsgi.in
+++ b/rpkid/portal-gui/rpki.wsgi.in
@@ -17,46 +17,12 @@
__version__ = '$Id$'
-VIRTUAL_ENV = '@VIRTUAL_ENV@'
-
-import os
-import os.path
import sys
-
-old_sys_path = list(sys.path)
-
-
-def walk_error(e):
- 'This function is invoked when os.walk() needs to report an error'
- print >>sys.stderr, 'error reading %s: %s' % (e.filename, e)
-
-# When used with virtualenv, specify the location of the python modules to use
-if VIRTUAL_ENV:
- d = os.path.join(VIRTUAL_ENV, 'lib')
- # locate the site-packages directory
- for dp, dn, fn in os.walk(os.path.join(VIRTUAL_ENV, 'lib'),
- onerror=walk_error):
- if 'site-packages' in dn:
- d = os.path.join(dp, 'site-packages')
- import site
- site.addsitedir(d)
- break
+import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
sys.path.insert(1, '@PYTHONPATH@')
-# reorder sys.path to place newly added directories at the head of the path.
-# this is necessary so that the packages in the virtualenv site-packages are
-# used rather than the system site-packages.
-new_sys_path = []
-for elt in list(sys.path):
- if elt not in old_sys_path:
- new_sys_path.append(elt)
- sys.path.remove(elt)
-sys.path[:0] = new_sys_path
-
-#print >>sys.stderr, sys.path
-
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()