[merge] look for plugins in arch-independent site directory (was Re: Bundling more plugins into bzrtools)

Robert Collins robertc at robertcollins.net
Fri Feb 15 23:51:27 GMT 2008


On Fri, 2008-02-15 at 11:22 -0800, Toshio Kuratomi wrote:
> Robert Collins wrote:
> > I'm pretty sure distutils isn't always installed in some places
> > 
> > so I suggest:
> > 
> > @@ -105,6 +107,10 @@ def set_plugins_path():
> >      path = map(_strip_trailing_sep, path)
> >      # search the plugin path before the bzrlib installed dir
> >      path.append(os.path.dirname(_mod_plugins.__file__))
> > +    # search the arch independent path if we can determine it
> > +    try:
> > +        from distutils.sysconfig import get_python_lib
> > +        archless_path = osutils.pathjoin(get_python_lib(), 'bzrlib',
> > +            'plugins')
> > +        if archless_path not in path:
> > +            path.append(archless_path)
> >      _mod_plugins.__path__ = path
> > 
> I think we need to catch the exception as well :-).  Patch that does 
> this is attached.  (This one not tested as I'm away from my x86_64 at 
> the moment.)

Yeah indeed :).

> > 
> > Or, alternatively, calculate the right path during setup.py's execution.
> > 
> That won't work as setup.py will detect what's correct on the build 
> machine.  In a noarch package we need to detect what's right on the 
> system that runs bzr.

Uhm, the path we're adding should be the same on the build machine as
the installed machine, for all packaging systems I've seen.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080216/1075f636/attachment.pgp 


More information about the bazaar mailing list