/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-06 08:36:27 UTC
  • mfrom: (3232.1.3 toshio)
  • Revision ID: pqm@pqm.ubuntu.com-20080406083627-bx7vnc0sdjfd2nvs
(Toshio Kuratomi) look for plugins in arch-independent site directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
    if not bzr_exe:     # don't look inside library.zip
101
101
        # search the plugin path before the bzrlib installed dir
102
102
        path.append(os.path.dirname(_mod_plugins.__file__))
 
103
    # search the arch independent path if we can determine that and
 
104
    # the plugin is found nowhere else
 
105
    if sys.platform != 'win32':
 
106
        try:
 
107
            from distutils.sysconfig import get_python_lib
 
108
        except ImportError:
 
109
            # If distutuils is not available, we just won't add that path
 
110
            pass
 
111
        else:
 
112
            archless_path = osutils.pathjoin(get_python_lib(), 'bzrlib',
 
113
                    'plugins')
 
114
            if archless_path not in path:
 
115
                path.append(archless_path)
103
116
    _mod_plugins.__path__ = path
104
117
    return path
105
118