On Sun, 2008-02-17 at 15:28 -0500, Jeff Licquia wrote:
> Based on some discussions here regarding plugin maintenance best
> practices, I've updated the bisect plugin and decided to release it as 1.0.
Cool.
I think it would be good to add some queryable metadata to plugins for
building a registry of them. To be able to process this with the plugin
uninstalled and missing dependencies is desirable (so that you can index
a plugin you /can't/ load (such as one for windows only). So I propose
some variables put in setup.py as globals - you can import setup.py and
query it. And setup.py is the only thing guaranteed importable :). If
someone has a buggy setup.py (e.g. one that forgets to do
if __name__ == 'main':
setup stuff here
Then we can file bugs :).
I propose the following variables:
The name the plugin expects to be installed under:
bzr_plugin_name = 'bisect'
For commands:
bzr_commands = ['bisect']
For formats:
# (look for a .hg directory)
bzr_controldirs = {"Mercurial":{'.hg/': ''}}
﻿
# (look for a file called .svn/format with contents 4\n).
bzr_controldirs = {"Subversion":{'.svn/format': '4\n'}}
These seem to be the two key things we extend on at the moment. Then a
program can quickly index plugins by:
extract the plugin
load setup.py
inspect the variables
-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/20080218/4d790c1d/attachment.pgp