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

Toshio Kuratomi a.badger at gmail.com
Fri Feb 15 19:22:59 GMT 2008


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.)

> 
> 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.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-arch-indep-plugins.patch
Type: text/x-patch
Size: 890 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080215/0bb38c46/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080215/0bb38c46/attachment.pgp 


More information about the bazaar mailing list