~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to buildout-templates/_pythonpath.py.in

  • Committer: Gary Poster
  • Date: 2010-05-04 15:51:59 UTC
  • mto: (7675.623.144 launchpad)
  • mto: This revision was merged to the branch mainline in revision 10828.
  • Revision ID: gary.poster@canonical.com-20100504155159-uuqkfkqvu2xfp32t
previous fix was insufficient

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        sys.modules['site'].__file__, os.path.join(site_dir, 'site.py')))
36
36
 
37
37
if site_dir not in sys.path:
 
38
    sys.path.insert(0, site_dir)
 
39
elif 'site' not in sys.modules:
38
40
    # XXX 2010-05-04 gary bug 575206
39
 
    # This one line is to support Mailman 2, which does something funky
 
41
    # This one line is to support Mailman 2, which does something unexpected
40
42
    # to set up its paths.
41
43
    sys.path[:] = [p for p in sys.path if 'site-packages' not in p]
42
 
    # (End of triple-X code.)
43
 
    sys.path.insert(0, site_dir)
44
44
import site # sets up paths