summaryrefslogtreecommitdiff
path: root/misc/paths.py.in
diff options
context:
space:
mode:
authorbwarsaw2002-02-12 04:42:07 +0000
committerbwarsaw2002-02-12 04:42:07 +0000
commit04092ba16b15fa1d0f03299e3029c6f50a2ea54d (patch)
tree344a9e975d7b9629d9be775a35baf6dff384783f /misc/paths.py.in
parent8e17281d876a975a372feff8e1107e9170e34898 (diff)
downloadmailman-04092ba16b15fa1d0f03299e3029c6f50a2ea54d.tar.gz
mailman-04092ba16b15fa1d0f03299e3029c6f50a2ea54d.tar.zst
mailman-04092ba16b15fa1d0f03299e3029c6f50a2ea54d.zip
Diffstat (limited to 'misc/paths.py.in')
-rw-r--r--misc/paths.py.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/misc/paths.py.in b/misc/paths.py.in
index 7b98b50ba..f774558d1 100644
--- a/misc/paths.py.in
+++ b/misc/paths.py.in
@@ -1,6 +1,6 @@
# -*- python -*-
-# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -23,6 +23,9 @@
# attributes that other modules may use to get the absolute path to the
# installed Mailman distribution.
+import sys
+import os
+
# some scripts expect this attribute to be in this module
prefix = '@prefix@'
exec_prefix = '@exec_prefix@'
@@ -33,5 +36,13 @@ if exec_prefix == '${prefix}':
# Hack the path to include the parent directory of the $prefix/Mailman package
# directory.
-import sys
sys.path.insert(0, prefix)
+
+# 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.insert(0, sitedir)