summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-01-29 19:05:49 +0000
committerbwarsaw2002-01-29 19:05:49 +0000
commit7bfdbd73cf74b2ac5dde6e6222120bd3078b9dc7 (patch)
tree5b3cc7231e4776d7389a17b97295424e9abd6580
parent7b278a09e69aa1d4f9e1b0d3f4b611641d0b1313 (diff)
downloadmailman-7bfdbd73cf74b2ac5dde6e6222120bd3078b9dc7.tar.gz
mailman-7bfdbd73cf74b2ac5dde6e6222120bd3078b9dc7.tar.zst
mailman-7bfdbd73cf74b2ac5dde6e6222120bd3078b9dc7.zip
To better support a patched email package w/ Python 2.2, prepend
sitedir to sys.path instead of appending it. This means our email package will override the one in Python 2.2.
-rw-r--r--Mailman/Defaults.py.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index a30bbaa80..69f360f91 100644
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -1066,10 +1066,11 @@ add_language('ru', _('Russian'), 'koi8-r')
del _
-# Include Python's site-packages directory. We need this until we require
-# Python 2.2, which includes the email package in its standard library. Until
-# then, we distribute the email package as a distutils install.
+# Include Python's site-packages directory. We need this even for Python 2.2
+# since the email package has some patches not included in 2.2 final (though
+# likely included in a 2.2 patch release, not available as of this writing
+# 29-Jan-2002). That's why we prepend sitedir to sys.path, not append it.
import sys
sitedir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3],
'site-packages')
-sys.path.append(sitedir)
+sys.path.insert(0, sitedir)