aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure13
-rw-r--r--configure.ac8
-rw-r--r--rpkid/Makefile.in4
-rw-r--r--rpkid/portal-gui/rpki.wsgi.in36
4 files changed, 2 insertions, 59 deletions
diff --git a/configure b/configure
index dc0e3ad0..482065ff 100755
--- a/configure
+++ b/configure
@@ -605,7 +605,6 @@ WSGI_PROCESS_GROUP
WSGI_DAEMON_PROCESS
DJANGO_ADMIN
SECRET_KEY
-VIRTUAL_ENV
OPENSSL_SO_GLOB
OPENSSL_CONFIG_COMMAND
TOP_LEVEL_SUBDIRS
@@ -4879,18 +4878,6 @@ fi
if test $build_ca_tools = yes
then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if running under virtualenv" >&5
-$as_echo_n "checking if running under virtualenv... " >&6; }
- if test "x$VIRTUAL_ENV" != "x"; then
- VIRTUAL_ENV=$VIRTUAL_ENV
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIRTUAL_ENV" >&5
-$as_echo "$VIRTUAL_ENV" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-
# Source: http://blog.leosoto.com/2008/04/django-secretkey-generation.html
SECRET_KEY=`$PYTHON -c 'import random; print "".join(random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50))'`
diff --git a/configure.ac b/configure.ac
index 33ac6f1e..ac261db3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,14 +699,6 @@ fi
if test $build_ca_tools = yes
then
- AC_MSG_CHECKING([if running under virtualenv])
- if test "x$VIRTUAL_ENV" != "x"; then
- AC_SUBST(VIRTUAL_ENV, [$VIRTUAL_ENV])
- AC_MSG_RESULT([$VIRTUAL_ENV])
- else
- AC_MSG_RESULT(no)
- fi
-
# Source: http://blog.leosoto.com/2008/04/django-secretkey-generation.html
AC_SUBST(SECRET_KEY, `$PYTHON -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'`)
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()