diff options
author | <> | 2003-01-02 05:25:50 +0000 |
---|---|---|
committer | <> | 2003-01-02 05:25:50 +0000 |
commit | b132a73f15e432eaf43310fce9196ca0c0651465 (patch) | |
tree | c15f816ba7c4de99fef510e3bd75af0890d47441 /misc/paths.py.in | |
download | mailman2-b132a73f15e432eaf43310fce9196ca0c0651465.tar.gz mailman2-b132a73f15e432eaf43310fce9196ca0c0651465.tar.xz mailman2-b132a73f15e432eaf43310fce9196ca0c0651465.zip |
This commit was manufactured by cvs2svn to create branch
'Release_2_1-maint'.
Diffstat (limited to 'misc/paths.py.in')
-rw-r--r-- | misc/paths.py.in | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/misc/paths.py.in b/misc/paths.py.in new file mode 100644 index 00000000..18451ac8 --- /dev/null +++ b/misc/paths.py.in @@ -0,0 +1,60 @@ +# -*- python -*- + +# 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 +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This file becomes paths.py which is installed in may directories. By +# importing this module, sys.path gets `hacked' so that the $prefix/Mailman +# directory is inserted at the start of that list. That directory really +# contains the Mailman modules in package form. This file exports two +# 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@' + +# work around a bogus autoconf 2.12 bug +if exec_prefix == '${prefix}': + exec_prefix = prefix + +# Hack the path to include the parent directory of the $prefix/Mailman package +# directory. +sys.path.insert(0, prefix) + +# We also need the pythonlib directory on the path to pick up any overrides of +# standard modules and packages. Note that these must go at the front of the +# path for this reason. +sys.path.insert(0, os.path.join(prefix, 'pythonlib')) + +# Include Python's site-packages directory. +sitedir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3], + 'site-packages') +sys.path.append(sitedir) + + +# In a normal interactive Python environment, the japanese.pth and korean.pth +# files would be imported automatically. But because we inhibit the importing +# of the site module, we need to be explicit about importing these codecs. +import japanese +# As of KoreanCodecs 2.0.5, you had to do the second import to get the Korean +# codecs installed, however leave the first import in there in case an upgrade +# changes this. +import korean +import korean.aliases |