bzr-plugin-info [suggest plugins at runtime]

Robert Collins robert.collins at canonical.com
Mon Mar 8 08:54:20 GMT 2010


On Mon, 2010-03-08 at 16:25 +1100, Martin Pool wrote:
> 
> It is a bit messy.  Putting it into a separate file meta.py causes
> problems loading it after the package is installed.  I think having
> setup.py load it from a file inside the module is probably ok as long
> as some care is taken.

plugin-info is tested to work with plugins that do
from version import *
setup (version=__version__...)

and other similar things.

> You could argue plugin-info should read some of this from the plugin
> itself rather than the metafile but at this point getting the whole
> thing connected end to end is probably more important than futzing
> with just where it's defined.

The 'plugin' doesn't really exist until its installed - and other
related things can go wrong:
 - its deps may prevent it being imported
 - an older version may already be installed
 - it might be for windows only 

The choices really are:
 - read from setup.py
 - read from another 'well known' file.

I chose setup.py because every plugin that is being maintained will have
one (in order to be installable!), so its easy to get at. Further to
that, the plugins usually have definitions of versions and the like in
setup.py *anyway* - whatever duplication there is with the rest of the
codebase isn't exacerbated by the info scanner.

That said, I'm not really attached to any particular layout - whatever
folk are happy with, we can do.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100308/5655082e/attachment.pgp 


More information about the bazaar mailing list