diff options
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/Makefile.in | 4 | ||||
-rw-r--r-- | rpkid/portal-gui/rpki.wsgi.in | 36 |
2 files changed, 2 insertions, 38 deletions
diff --git a/rpkid/Makefile.in b/rpkid/Makefile.in index e8591314..b0fc8201 100644 --- a/rpkid/Makefile.in +++ b/rpkid/Makefile.in @@ -6,7 +6,6 @@ PYTHON = @PYTHON@ TRANG = @TRANG@ SECRET_KEY = @SECRET_KEY@ -VIRTUAL_ENV = @VIRTUAL_ENV@ DJANGO_ADMIN = @DJANGO_ADMIN@ CFLAGS = @CFLAGS@ @@ -273,8 +272,7 @@ portal-gui/scripts/rpkigui-check-expired: portal-gui/scripts/rpkigui-check-expir ${COMPILE_PYTHON} portal-gui/rpki.wsgi: ${srcdir}/portal-gui/rpki.wsgi.in - sed -e "s|@VIRTUAL"_"ENV@|${VIRTUAL_ENV}|" \ - -e "s|@PYTHON""PATH@|${sysconfdir}/rpki|" \ + sed -e "s|@PYTHON""PATH@|${sysconfdir}/rpki|" \ ${srcdir}/portal-gui/rpki.wsgi.in > portal-gui/rpki.wsgi portal-gui/settings.py: ${srcdir}/portal-gui/settings.py.in 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() |