From 195ad995d62c854e5ee5e2b36fb8c90a10a72dea Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 25 Sep 2013 22:51:22 +0000 Subject: Add --enable-wsgi-python-egg-cache. See #630. svn path=/trunk/; revision=5520 --- rpkid/portal-gui/rpki.wsgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rpkid/portal-gui') diff --git a/rpkid/portal-gui/rpki.wsgi b/rpkid/portal-gui/rpki.wsgi index a01bf8f7..72ba75ac 100644 --- a/rpkid/portal-gui/rpki.wsgi +++ b/rpkid/portal-gui/rpki.wsgi @@ -22,7 +22,8 @@ import os import rpki.autoconf os.environ['DJANGO_SETTINGS_MODULE'] = 'rpki.gui.default_settings' -# needed for local_settings.py + +# Needed for local_settings.py sys.path.insert(1, rpki.autoconf.sysconfdir + '/rpki') # Kludge to disable use of setproctitle in rpki.log. For reasons @@ -32,6 +33,12 @@ sys.path.insert(1, rpki.autoconf.sysconfdir + '/rpki') # what this is about, just disable setproctitle in WSGI case for now. os.environ['DISABLE_SETPROCTITLE'] = 'yes' +# Kludge to set PYTHON_EGG_CACHE, mostly for FreeBSD where the ports +# system installs Python eggs in their zipped format and expects each +# user application to unpack them into its own egg cache. +if not os.environ.get('PYTHON_EGG_CACHE') and rpki.autoconf.WSGI_PYTHON_EGG_CACHE_DIR: + os.environ['PYTHON_EGG_CACHE'] = rpki.autoconf.WSGI_PYTHON_EGG_CACHE_DIR + import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() -- cgit v1.2.3